VAST · Claude Sonnet 5 · C2

Vastopolis outbreak investigation — C2 · ATWL + example

C2

Raw session log. Atwl spec + one worked example (hitl).

4 turns (2 user · 2 assistant) json raw log

1 Researcher

You have received two files: the ATWL specification, which defines a formal language for representing visual analytics workflows, and an example workflow expressed in ATWL. Please read both carefully before we proceed.

The ATWL specification describes the language's artifact types, transform intents, actor designations, loop constructs, and syntax. The example workflow illustrates how these elements are used together to describe a specific visual analytics process. Note that the example represents one type of workflow among many possible; its specific analytical structure reflects its particular task and should not be treated as a template that must be followed for other tasks. What the example illustrates is how the language is used — the syntax, the vocabulary, and the conventions for organising artifacts, transforms, and loops — not what analytical structure any given task requires.

In the next message I will describe a specific visual analytics design task. Your job will be to design an analytical workflow that addresses the task, and to express your recommendation both in natural language (for readability) and in ATWL (for structural precision). The natural-language description should explain the analytical logic of the workflow; the ATWL representation should formally specify the artifacts, transforms, loops, actors, and control flow.

Before we proceed, could you briefly confirm that you have understood the ATWL specification and the example, and let me know if you have any questions about the language or the syntax?

You need to reply in English.

2 Model

I've reviewed the ATWL specification and the example workflow carefully.

Summary of my understanding:

  • Artifacts (8 fixed types: entities, feature, arrangement, visualisation, pattern, model, knowledge, specification) represent analytical objects, each with type-specific fields (e.g., internal structure/embedment for entities, value structure/value type for features, context/principle for arrangements, etc.). origin: given marks exogenous artifacts not produced within the workflow.

  • Transforms consume input artifacts and produce output artifacts, each with a single generic intent (define-unit, characterise, contextualise, visualise, abstract, build-model, generate-knowledge, assess), an optional manner specialisation, and an actor (human/machine/hybrid).

  • Control structures — loops (with purpose, until, body), conditionals (if/then/else, possibly with exit loop), and assignments (:= for iterative artifact updates) — capture analytic logic (iteration, branching) rather than executable control flow.

  • Workflow header includes an optional template (a high-level sequence of intents, possibly with loop(...) notation) and a description.

  • The example (behaviour-pattern recognition in vessel trajectories) illustrates a human-in-the-loop workflow with two nested refinement loops (feature refinement via clustering/visualisation/assessment, and model refinement via prediction/visualisation/assessment), showing how loops, conditionals, and assignments are structured syntactically, and how artifacts/transforms are declared and cross-referenced.

I understand that this example's specific structure (clustering → labelling → classifier training → iterative refinement) is just one illustration of the syntax and conventions, not a template to impose on other tasks — the actual analytical structure should be derived from the specific task you describe.

I have no outstanding questions about the syntax. Please go ahead and describe the visual analytics design task.

3 Researcher

A public health team in Vastopolis, a metropolitan area of about two million residents, has observed a sharp increase in flu-like illnesses over the past few days, with several deaths believed to be associated with the current outbreak. The team wants to understand where the outbreak started and how the infection is being transmitted (person-to-person, airborne, waterborne, or something else) so that emergency management resources can be deployed appropriately.

The available data consists of: geolocated microblog messages posted from mobile devices over a period of several days, each with a timestamp, GPS coordinates, and text content; a map of the metropolitan area showing highways, hospitals, landmarks, and water bodies; population statistics for 13 city zones; and daily weather observations including wind speed and direction.

The analyst will need to inspect intermediate results visually and use domain knowledge to interpret patterns and make judgements at each stage.

Design an analytical workflow for this problem.

4 Model

I'm thinking through how to approach this outbreak investigation. The public health team needs to pinpoint where the outbreak originated geographically and identify the transmission mechanism—whether it's spreading person-to-person, through the air, contaminated water, or some other route. I have geolocated social media posts with timestamps and locations, plus geographic data about the metro area including infrastructure and water systems, which should help me trace the spatial pattern and infer transmission pathways.

The analytical workflow would start by filtering the raw social media messages to identify ones discussing illness symptoms, then extract relevant features like symptom mentions and sentiment. From there, I'd arrange these messages spatially and temporally to visualize how the outbreak spreads across the city over time—mapping clusters of sick people and tracking whether they align with population density, transportation routes, water distribution, or wind patterns depending on the suspected transmission mode. For airborne transmission, I'd need to overlay wind direction and speed data to see if the outbreak spreads along wind patterns rather than outward from the origin. For waterborne, I'd check if cases cluster near water bodies or downstream from a potential source. There could also be other vectors like a specific landmark (restaurant, treatment facility) or hospital-related transmission. So the approach is to test each hypothesis by layering relevant contextual data—wind vectors, water infrastructure, population density—and visually assessing which spatial correlation best explains the observed case distribution. Now I'm thinking through the data structure: the geolocated messages form points in space-time, each embedded within networks of users and other messages.

I need to filter these messages for illness-related content using symptom keywords, then extract symptom indicators as features to identify which messages represent actual disease reports.

Since text data is inherently noisy, I should build in a refinement loop: filter the messages, visualize them on a map to assess relevance, then iteratively refine the keyword list based on what I see. I'll maintain a specification artifact for the keywords that gets updated through this assessment process.

Now moving into the spatio-temporal characterization phase...

I need to arrange the filtered illness reports geographically on a map using the regional context, and also create a temporal arrangement by binning reports into daily or hourly intervals. I could either combine these into a single space-time grid or keep them as separate arrangements—I'm leaning toward separate transforms for clarity, one mapping reports to geographic zones and another organizing them chronologically. Then I'll set up a visualization that shows how the illness reports are spreading across both space and time.

Once I have that animated view, I need to identify patterns—specifically where the outbreak originated (the first cluster of cases) and how it's propagating (whether it's radiating outward, following corridors, etc.). After that, I'll loop back to refine my illness report identification and keywords if the patterns aren't clear enough. Finally, I need to normalize everything by population, so I'll characterize each zone with its population and area statistics.

Now I'm counting the illness reports per zone across time bins to get case counts, then normalizing those counts by each zone's population to calculate incidence rates. I'll visualize this as a choropleth map with a time slider so the spread becomes clear geographically and temporally.

From that visualization, I can identify which zone had the earliest and highest incidence — that's likely the outbreak epicenter. Then I'll generate a knowledge statement about where and when the outbreak originated.

For the transmission mechanism, I'm setting up a loop to test different hypotheses — comparing the observed spread pattern against signatures of candidate mechanisms like wind patterns, water bodies, highways, and population mobility to find which one best explains the observed spread. The alternative approach would be to compute correlation features for all mechanisms simultaneously in each iteration rather than testing them sequentially, then compare results to determine which mechanism best explains the transmission pattern—this might be cleaner than modeling hypothesis-switching as explicit state updates, especially if we can leverage the spatial and temporal data we already have to discriminate between mechanisms directly. I'm defining three parallel transforms to characterize different transmission mechanisms: one measuring how illness spread aligns with wind direction over time, another computing distances from cases to water bodies or correlation with water distribution zones, and a third capturing whether the diffusion pattern matches person-to-person transmission or follows some other spatial clustering.

Then I'm creating a visualization that overlays case locations and timing with wind vectors, water networks, and highway corridors to visually compare these competing hypotheses, followed by an assessment transform that evaluates which transmission mechanism best explains the observed patterns.

If the assessment remains inconclusive, I loop back to refine the features or filtering—perhaps improving spatial resolution or reducing noise in the message data—then reassess with the updated information. Once I have a clear picture, I generate the final knowledge output describing the most likely transmission mode and origin location to guide resource deployment decisions. op text filtering.

I need a second loop for transmission analysis—iteratively refining hypotheses about how the illness spreads using different feature characterizations and visual overlays until I reach a confident assessment. There's also a spatial-temporal pattern loop for pinpointing the origin by visualizing the spread, abstracting patterns, assessing clarity, and refining the time and space binning.

To keep this manageable but rigorous, I'm structuring the workflow as: filter messages, characterize symptom features, then loop through visualization and assessment with refined filtering, followed by aggregating counts across zones and time, normalizing by population...

Then mapping those patterns spatially and temporally, visualizing the origin pattern, and running another loop to characterize transmission-specific features with visual overlays and refinement before synthesizing everything into knowledge.

I should reorder this: first the filtering loop, then spatio-temporal aggregation and visualization for origin identification, then the transmission mechanism loop, and finally the synthesis. Now I'm ready to write out the full ATWL specification, starting with defining the entities—microblogs with their origin, internal structure, embedment in space and time, and features like text content, timestamps, and GPS coordinates as spatial vectors.

For the map data, I'm thinking of it as a context entity set representing spatial reference layers—highways, hospitals, landmarks, water bodies—each with their own internal structure and formation properties.

Then there are the city zones themselves, which are bounded spatial regions with population statistics and names, serving as the units for normalizing incidence data across the metropolitan area.

I'm also tracking weather data as a separate entity set with temporal embedment...

Adding wind observations...

Now I'm moving into the transforms, starting with extracting symptom signals from the microblogs using keyword and lexicon matching to identify mentions of flu-like symptoms, severity indicators, and death-related language.

I realize the keyword specification should also be an input to this extraction transform as control knowledge. Then I'm defining a filter transform that takes the microblogs and symptom signals to produce a subset of illness-related reports, which are geolocated and timestamped messages that indicate flu-like illness experience.

Now I'm setting up a refinement loop that iteratively improves the keyword lexicon and filtering criteria until the resulting illness reports look plausibly illness-related and the spatial-temporal density patterns match what I'd expect from a genuine outbreak rather than noise. Within this loop, I'm mapping the filtered reports onto geographic layers to contextualize them spatially, then visualizing them as colored points on a map. If the quality judgment suggests refinement is needed, I generate revised keyword specifications based on the false positives and negatives observed, then re-run the extraction and filtering transforms with the updated rules, reassigning the results back to the working variables. Otherwise, I proceed to the next step.

Once the refinement loop completes, I have the final illness reports and symptom signal definitions ready. The reports map artifact from the last iteration serves as the final output for subsequent spatio-temporal analysis, so I can reference it directly without needing to redeclare it outside the loop.

Now I'm moving into spatio-temporal characterization to identify the outbreak origin. I need to aggregate illness reports by zone and day through a spatial join operation, then normalize those case counts by zone population to calculate incidence rates per capita, which will help identify where the outbreak is most concentrated.

For the temporal aspect, I'm realizing I can embed time directly within the incidence rate vectors rather than creating a separate temporal arrangement—this lets me use the vector time series for visualization without extra intermediate steps. I'll create an animated choropleth map that shows how incidence rates evolve across zones over time, with spatial arrangement of zones and timestamps encoded as animation frames. Now I'm moving on to characterize the transmission mechanism by examining wind patterns and their alignment with the outbreak spread. I'll analyze the relationship between weather data, geographic features like water bodies and highways, and population density to determine if wind direction correlates with how the illness diffused across zones. cases are disproportionately near water sources, testing the waterborne-transmission hypothesis. I'm also defining a transform to characterize how cases spread between zones over time, accounting for population density, adjacency, and road connectivity to distinguish between gradual spatial contagion and point-source patterns. Next I'm setting up visualization overlays to display these mechanisms.

Writing visualization overlays... The loop continues if the evidence is inconclusive—I'd refine the mechanism-specific features by examining the illness reports, weather data, and map layers at finer resolution or with additional context, then generate an updated specification to guide the next iteration, whether that's narrowing the time window, focusing on specific zones, or zeroing in on particular candidate mechanisms. I need to pass the mechanism specification as an input to those three characterization transforms so they can use the refined analysis scope, then once the loop finishes, I'll synthesize all the findings—combining the outbreak origin, transmission evidence, and filter quality data into a final set of statements and recommendations.

Now I'm reconsidering how to structure the map layers artifact. Since highways, hospitals, landmarks, and water bodies have different geometric types and properties, it makes more sense to split them into separate artifacts rather than forcing them into a single heterogeneous collection. I'm settling on a single unified artifact instead—D_map_context—that captures all the geographic layers (roads, hospitals, landmarks, water bodies) with a categorical layer_type field and spatial geometry, serving both as visualization background and input for spatial analyses. Now I'm working through the template structure and verifying the loop sequences — the first loop handles filter refinement with contextualise, visualise, assess, and define-unit steps, while the second loop focuses on mechanism analysis with characterise, visualise, assess, and generate-knowledge. I'm also assigning actor types to each transform (machine for computational steps like filtering and rendering, human for assessment and knowledge refinement), and deciding which artifacts need reassignment within loops versus fresh declaration. For the data entities, I'm confirming that D_illness_reports and F_symptom_signal persist and update across iterations via assign statements, while mechanism features like F_wind_alignment are recomputed fresh each loop iteration. I'm also adding K_domain_transmission_knowledge as a given knowledge artifact representing epidemiological domain rules to interpret observed patterns, which enriches the workflow's knowledge injection layer.

Analytical Workflow (Natural‑Language Description)

Goal: From geolocated microblogs, a map, zone population statistics, and weather data, determine (a) where and when the outbreak began, and (b) which transmission mechanism (person‑to‑person, airborne, waterborne, or other) best explains its spread — to guide resource deployment. Because the raw signal (social‑media text) is noisy and the causal question requires domain interpretation, the workflow is human‑in‑the‑loop throughout, with two explicit refinement loops.

1. Extract an illness signal from microblogs, refined interactively. Symptom/severity/death‑related keywords (a specification, initially analyst‑supplied) are matched against message text to produce a symptom‑indicator feature, which is then used to filter the full microblog set down to a set of illness reports. Because keyword‑based filtering is imprecise, a loop maps the reports geographically, lets the analyst visually inspect their spatial/temporal density and sample content, and assesses whether the set looks like a genuine illness signal or noise. If not, the keyword lexicon is revised (a new specification) and extraction/filtering are re‑run, until the filtered set is judged reliable.

2. Establish the spatial‑temporal footprint and locate the origin. Illness reports are aggregated into daily counts per zone and normalised by zone population to obtain per‑capita incidence rates (correcting for the fact that zones differ greatly in population). The incidence rates are visualised as an animated choropleth map over the outbreak period, and the analyst interprets this display to identify the earliest‑affected zone(s), approximate onset time, and the overall shape of the spread (e.g., a single radiating focus vs. several near‑simultaneous foci) — the candidate outbreak origin.

3. Test transmission‑mechanism hypotheses, refined iteratively. Three mechanism‑specific signatures are computed from the illness reports and contextual data: (i) alignment between the daily spread direction from the origin and prevailing wind direction/speed (airborne signature), (ii) proximity of cases to water bodies/water infrastructure on the map (waterborne signature), and (iii) whether the zone‑to‑zone spread follows population density and road connectivity in a gradual, contact‑like pattern versus appearing simultaneously in disconnected zones (person‑to‑person vs. point‑source signature). These are displayed together on coordinated map overlays (wind vectors, water layer, zone‑connectivity graph) so the analyst can visually compare the observed spread against each candidate signature, informed also by injected epidemiological domain knowledge about what each mechanism typically looks like spatio‑temporally. The analyst assesses whether the evidence is conclusive; if not, the analysis scope (time window, spatial resolution, map layers considered) is adjusted and the mechanism‑specific features are recomputed, iterating until one mechanism (or ranked set) is clearly best supported.

4. Synthesise findings. The identified origin location/time and the transmission‑mechanism conclusion are combined into an explicit knowledge artifact summarising where the outbreak started and how it is most plausibly spreading, to inform prioritisation of emergency‑management resources (e.g., targeted containment appropriate to airborne, waterborne, or person‑to‑person spread).


ATWL Representation

workflow vastopolis-outbreak-origin-and-transmission
  template: characterise -> define-unit ->
            loop(contextualise -> visualise -> assess -> define-unit) ->
            characterise -> characterise ->
            contextualise -> visualise -> abstract ->
            loop(characterise -> visualise -> assess -> generate-knowledge) ->
            generate-knowledge
  description: "Human-in-the-loop workflow to identify the spatial-temporal
    origin of a flu-like outbreak in Vastopolis and to determine the most
    plausible transmission mechanism (person-to-person, airborne,
    waterborne, or other), combining social-media evidence with map,
    population, and weather context to support resource deployment
    decisions"

# ============================================================================
# INPUT
# ============================================================================

artifact D_microblogs : entities
  origin: given
  internal structure: elementary
  embedment: {set, space, time}
  features:
    - id: text_content
      value structure: atomic
      value type: text
      description: "Free text content of the message"
    - id: location
      value structure: atomic
      value type: spatial
      description: "GPS coordinates of posting"
    - id: timestamp
      value structure: atomic
      value type: temporal
      description: "Posting time"
  description: "Geolocated microblog messages posted from mobile devices
    over the outbreak period"

artifact D_zones : entities
  origin: given
  internal structure: region
  embedment: space
  features:
    - id: population
      value structure: atomic
      value type: numeric
      description: "Resident population of the zone"
    - id: zone_name
      value structure: atomic
      value type: categorical
      description: "Zone identifier/name"
  description: "13 city zones with population statistics, used as spatial
    units for incidence normalisation"

artifact D_weather : entities
  origin: given
  internal structure: elementary
  embedment: time
  features:
    - id: wind_speed
      value structure: atomic
      value type: numeric
      description: "Daily wind speed"
    - id: wind_direction
      value structure: atomic
      value type: numeric
      description: "Daily wind direction"
  description: "Daily weather observations over the outbreak period"

artifact D_map_context : entities
  origin: given
  internal structure: elementary
  embedment: space
  features:
    - id: layer_type
      value structure: atomic
      value type: categorical
      description: "Map layer category: highway, hospital, landmark,
        water_body"
    - id: geometry
      value structure: atomic
      value type: spatial
      description: "Geometry of the map feature"
  description: "Static geographic layers of the metropolitan area (road
    network, hospitals, landmarks, water bodies), used as spatial reference
    context for mapping and mechanism analysis"

artifact S_keyword_spec : specification
  origin: given
  representation form: "keyword lexicon"
  description: "Initial lexicon of flu-like symptom, severity, and
    death-related terms used to identify illness-related messages"

artifact K_domain_transmission_knowledge : knowledge(D_weather, D_map_context)
  origin: given
  representation form: "domain rules"
  description: "Epidemiological domain knowledge describing expected
    spatial-temporal signatures of airborne, waterborne, and
    person-to-person transmission, used to interpret observed spread
    patterns"

# ============================================================================
# STEP 1: EXTRACT AND FILTER ILLNESS-RELATED REPORTS
# ============================================================================

transform T_extract_symptom_signal :
  intent: characterise
  manner: "keyword/text feature extraction"
  input: D_microblogs, S_keyword_spec
  output: F_symptom_signal
  actor: machine
  description: "Match message text against the keyword lexicon to derive
    indicators of symptom mention, severity, and death-related content"

artifact F_symptom_signal : feature(D_microblogs)
  value structure: vector
  value type: categorical
  representation form: "boolean indicators for symptom mention, severity
    keywords, and death-related keywords"
  description: "Text-derived illness-indicator features per message"

transform T_filter_illness_reports :
  intent: define-unit
  manner: "filter"
  input: D_microblogs, F_symptom_signal
  output: D_illness_reports
  actor: machine
  description: "Select messages whose content indicates flu-like illness"

artifact D_illness_reports : entities
  internal structure: elementary
  embedment: {set, space, time}
  description: "Geolocated, timestamped messages indicative of flu-like
    illness"

# ============================================================================
# STEP 2: FILTER REFINEMENT LOOP
# ============================================================================

loop L_filter_refinement:
  purpose: "Refine the keyword lexicon and filtering criteria so the
    illness-report set is a reliable proxy for actual illness incidence"
  until: "Visual inspection confirms filtered reports are plausibly
    illness-related and their spatial-temporal density looks consistent
    with a genuine outbreak signal rather than noise"
  body:

    transform T_contextualise_reports_map :
      intent: contextualise
      manner: "map-based"
      input: D_illness_reports, D_map_context
      output: A_reports_map
      actor: machine
      description: "Position illness reports on the metropolitan map"

    artifact A_reports_map : arrangement(D_illness_reports)
      context: D_map_context
      principle: "geographic coordinates"
      description: "Spatial placement of illness reports relative to
        roads, hospitals, landmarks, and water bodies"

    transform T_visualise_reports :
      intent: visualise
      manner: "coloured points on map with time slider"
      input: A_reports_map, D_illness_reports
      output: V_reports_check
      actor: machine
      description: "Display raw spatial-temporal distribution of filtered
        reports for inspection of content and density"

    artifact V_reports_check : visualisation(A_reports_map, D_illness_reports)
      layout: "map with time slider"
      form: "coloured points"
      encoding: "position from A_reports_map; colour/opacity from
        timestamp recency"
      description: "Interactive view for judging plausibility of the
        filtered illness signal"

    transform T_assess_filter :
      intent: assess
      manner: "judge relevance and noise level of filtered reports"
      input: V_reports_check, F_symptom_signal
      output: K_filter_quality
      actor: human
      description: "Assess whether filtered reports plausibly reflect
        genuine illness incidence or contain excessive noise/false
        positives"

    artifact K_filter_quality : knowledge(D_illness_reports, F_symptom_signal)
      representation form: "quality judgment"
      description: "Judgment of filtering adequacy and need for lexicon
        refinement"

    if K_filter_quality indicates refinement needed:
      then:
        transform T_refine_keywords :
          intent: generate-knowledge
          manner: "formulate methodological decision"
          input: K_filter_quality, F_symptom_signal
          output: S_keyword_spec_r
          actor: human
          description: "Revise keyword lexicon/filtering rules based on
            observed false positives/negatives"

        artifact S_keyword_spec_r : specification
          representation form: "keyword lexicon"
          description: "Revised keyword lexicon for illness-indicative
            content"

        transform T_extract_symptom_signal_r :
          intent: characterise
          manner: "keyword/text feature extraction"
          input: D_microblogs, S_keyword_spec_r
          output: F_symptom_signal_r
          actor: machine
          description: "Re-extract illness-indicator features using the
            revised lexicon"

        artifact F_symptom_signal_r : feature(D_microblogs)
          value structure: vector
          value type: categorical
          description: "Updated illness-indicator features per message"

        transform T_filter_illness_reports_r :
          intent: define-unit
          manner: "filter"
          input: D_microblogs, F_symptom_signal_r
          output: D_illness_reports_r
          actor: machine
          description: "Re-select illness-related messages using updated
            features"

        artifact D_illness_reports_r : entities
          internal structure: elementary
          embedment: {set, space, time}
          description: "Updated set of illness-related messages"

        assign:
          S_keyword_spec := S_keyword_spec_r
          F_symptom_signal := F_symptom_signal_r
          D_illness_reports := D_illness_reports_r
      else:
        exit loop L_filter_refinement

end loop L_filter_refinement

# ============================================================================
# STEP 3: SPATIAL-TEMPORAL FOOTPRINT AND ORIGIN IDENTIFICATION
# ============================================================================

transform T_aggregate_zone_counts :
  intent: characterise
  manner: "aggregate"
  input: D_illness_reports, D_zones
  output: F_case_counts
  actor: machine
  description: "Spatially join illness reports to zones and aggregate
    daily case counts per zone"

artifact F_case_counts : feature(D_zones)
  value structure: vector
  value type: numeric
  representation form: "daily case-count time series per zone"
  description: "Daily number of illness reports per zone"

transform T_normalise_incidence :
  intent: characterise
  manner: "compute-statistics (per-capita normalisation)"
  input: F_case_counts, D_zones
  output: F_incidence_rate
  actor: machine
  description: "Normalise daily case counts by zone population to obtain
    comparable per-capita incidence rates"

artifact F_incidence_rate : feature(D_zones)
  value structure: vector
  value type: numeric
  representation form: "daily per-capita incidence rate time series per
    zone"
  description: "Population-normalised daily illness incidence per zone"

transform T_visualise_incidence_spread :
  intent: visualise
  manner: "animated choropleth map with time slider"
  input: D_zones, F_incidence_rate, D_map_context
  output: V_incidence_map
  actor: machine
  description: "Show spatial-temporal progression of normalised illness
    incidence across zones and days"

artifact V_incidence_map : visualisation(D_zones, F_incidence_rate, D_map_context)
  layout: "map with time slider"
  form: "choropleth coloured zones"
  encoding: "zone geometry from D_map_context; colour intensity from
    F_incidence_rate per day"
  description: "Reveals onset location and diffusion pattern of the
    outbreak"

transform T_abstract_origin_pattern :
  intent: abstract
  manner: "perception-and-interpretation"
  input: V_incidence_map, V_reports_check
  output: P_outbreak_origin
  actor: human
  description: "Identify the zone(s) and approximate time where the
    outbreak appears to have started, and characterise the overall
    spatial diffusion pattern"

artifact P_outbreak_origin : pattern(D_zones, D_illness_reports)
  representation form: "spatial-temporal description of earliest cluster
    and diffusion direction"
  description: "Candidate outbreak origin (zone/time) and qualitative
    description of how the outbreak has spread so far"

# ============================================================================
# STEP 4: TRANSMISSION-MECHANISM ANALYSIS LOOP
# ============================================================================

artifact S_mechanism_spec : specification
  origin: given
  representation form: "analysis scope settings"
  description: "Initial scope for transmission-mechanism analysis: full
    time period, all zones, primary map layers (water bodies, road
    network)"

loop L_transmission_analysis:
  purpose: "Iteratively test and refine mechanism-specific evidence until
    the spread pattern is clearly best explained by one (or a ranked set
    of) transmission mechanism(s)"
  until: "Assessment yields a clear, defensible conclusion about the
    dominant transmission pathway"
  body:

    transform T_characterise_wind_alignment :
      intent: characterise
      manner: "define-relations (directional correlation)"
      input: P_outbreak_origin, D_illness_reports, D_weather, S_mechanism_spec
      output: F_wind_alignment
      actor: machine
      description: "Compute daily alignment between the direction of case
        spread from the origin and prevailing wind direction/speed
        (airborne-transmission signature)"

    artifact F_wind_alignment : feature(D_zones)
      value structure: vector
      value type: numeric
      representation form: "daily wind-spread alignment score per zone"
      description: "Evidence for airborne transmission"

    transform T_characterise_water_proximity :
      intent: characterise
      manner: "compute-statistics (spatial distance)"
      input: D_illness_reports, D_map_context, S_mechanism_spec
      output: F_water_proximity
      actor: machine
      description: "Compute distance of illness-report locations to
        nearest water body/water infrastructure (waterborne-transmission
        signature)"

    artifact F_water_proximity : feature(D_illness_reports)
      value structure: atomic
      value type: numeric
      description: "Evidence for waterborne transmission"

    transform T_characterise_diffusion_shape :
      intent: characterise
      manner: "define-relations (spatial diffusion pattern)"
      input: D_illness_reports, D_zones, D_map_context, S_mechanism_spec
      output: F_diffusion_shape
      actor: machine
      description: "Characterise zone-to-zone spread over time relative to
        population density and road connectivity, distinguishing gradual
        contact-like diffusion (person-to-person) from near-simultaneous
        onset in disconnected zones (point-source)"

    artifact F_diffusion_shape : feature(D_zones)
      value structure: relational configuration
      representation form: "time-stamped zone-adjacency graph weighted by
        case-onset lag"
      description: "Evidence distinguishing person-to-person from
        point-source spread"

    transform T_visualise_mechanism_overlays :
      intent: visualise
      manner: "coordinated overlay views"
      input: P_outbreak_origin, F_wind_alignment, F_water_proximity,
             F_diffusion_shape, D_map_context
      output: V_transmission_overlays
      actor: machine
      description: "Overlay wind vectors, water-proximity gradient, and
        zone-connectivity graph on the map for visual comparison against
        candidate transmission signatures"

    artifact V_transmission_overlays : visualisation(P_outbreak_origin,
        F_wind_alignment, F_water_proximity, F_diffusion_shape, D_map_context)
      layout: "map with wind-vector, water-layer, and zone-adjacency
        overlays, small multiples per day"
      form: "vector arrows, coloured zones, network edges"
      encoding: "wind arrows from F_wind_alignment; water-proximity colour
        gradient from F_water_proximity; connectivity edges from
        F_diffusion_shape"
      description: "Visual comparison of observed spread against airborne,
        waterborne, and person-to-person signatures"

    transform T_assess_transmission_hypotheses :
      intent: assess
      manner: "compare alternative results produced under different
        specifications"
      input: V_transmission_overlays, F_wind_alignment, F_water_proximity,
             F_diffusion_shape, K_domain_transmission_knowledge
      output: K_transmission_evidence
      actor: human
      description: "Judge which candidate transmission mechanism(s) best
        explain the observed spread, informed by domain knowledge of
        typical mechanism signatures; determine if evidence is conclusive"

    artifact K_transmission_evidence : knowledge(F_wind_alignment,
        F_water_proximity, F_diffusion_shape)
      representation form: "comparative quality judgment"
      description: "Evaluation of which transmission mechanism(s) are
        best supported by current evidence, and whether further analysis
        is needed"

    if K_transmission_evidence indicates refinement needed:
      then:
        transform T_adjust_analysis_scope :
          intent: generate-knowledge
          manner: "formulate methodological decision"
          input: K_transmission_evidence
          output: S_mechanism_spec_r
          actor: human
          description: "Decide how to refine the mechanism analysis, e.g.
            narrow time window to early outbreak days, focus on specific
            zones, or incorporate additional map layers"

        artifact S_mechanism_spec_r : specification
          representation form: "analysis scope settings"
          description: "Revised scope for transmission-mechanism analysis"

        assign:
          S_mechanism_spec := S_mechanism_spec_r
      else:
        exit loop L_transmission_analysis

end loop L_transmission_analysis

# ============================================================================
# STEP 5: SYNTHESISE FINDINGS
# ============================================================================

transform T_synthesise_findings :
  intent: generate-knowledge
  manner: "formulate-statements"
  input: P_outbreak_origin, K_transmission_evidence, K_filter_quality
  output: K_outbreak_findings
  actor: human
  description: "Synthesise conclusions about the outbreak's spatial-temporal
    origin and its most plausible transmission mechanism(s), to inform
    prioritisation of emergency-management resources"

artifact K_outbreak_findings : knowledge(D_illness_reports, D_zones,
    D_weather, D_map_context)
  representation form: "statements and recommendations"
  description: "Conclusions on outbreak origin location/time and dominant
    transmission mechanism, with implications for resource deployment"