{
  "chat_uuid": "eb73deb3-e13c-4a51-b6a4-3ccc977c5fb2",
  "history": [
    {
      "content": "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.\n\nThe 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.\n\nIn 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.\n\nBefore 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?\n\nYou need to reply in English.",
      "role": "user"
    },
    {
      "content": "I've reviewed the ATWL specification and the example workflow carefully.\n\n**Summary of my understanding:**\n\n- **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.\n\n- **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).\n\n- **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.\n\n- **Workflow header** includes an optional `template` (a high-level sequence of intents, possibly with `loop(...)` notation) and a `description`.\n\n- 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.\n\nI 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.\n\nI have no outstanding questions about the syntax. Please go ahead and describe the visual analytics design task.",
      "role": "assistant"
    },
    {
      "content": "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.\n\nThe 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.\n\nThe analyst will need to inspect intermediate results visually and use domain knowledge to interpret patterns and make judgements at each stage.\n\nDesign an analytical workflow for this problem.",
      "role": "user"
    },
    {
      "content": "<think>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.\n\nThe 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.\n\nI 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.\n\nSince 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.\n\nNow moving into the spatio-temporal characterization phase...\n\nI 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.\n\nOnce 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.\n\nNow 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.\n\nFrom 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.\n\nFor 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.\n\nThen 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.\n\nIf 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.\n\nI 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.\n\nTo 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...\n\nThen 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.\n\nI 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.\n\nFor 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.\n\nThen 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.\n\nI'm also tracking weather data as a separate entity set with temporal embedment...\n\nAdding wind observations...\n\nNow 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.\n\nI 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.\n\nNow 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.\n\nOnce 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.\n\nNow 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.\n\nFor 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.\n\nWriting 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.\n\nNow 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.</think>\n\n## Analytical Workflow (Natural‑Language Description)\n\n**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.\n\n**1. Extract an illness signal from microblogs, refined interactively.**\nSymptom/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.\n\n**2. Establish the spatial‑temporal footprint and locate the origin.**\nIllness 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.\n\n**3. Test transmission‑mechanism hypotheses, refined iteratively.**\nThree 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.\n\n**4. Synthesise findings.**\nThe 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).\n\n---\n\n## ATWL Representation\n\n```atwl\nworkflow vastopolis-outbreak-origin-and-transmission\n  template: characterise -> define-unit ->\n            loop(contextualise -> visualise -> assess -> define-unit) ->\n            characterise -> characterise ->\n            contextualise -> visualise -> abstract ->\n            loop(characterise -> visualise -> assess -> generate-knowledge) ->\n            generate-knowledge\n  description: \"Human-in-the-loop workflow to identify the spatial-temporal\n    origin of a flu-like outbreak in Vastopolis and to determine the most\n    plausible transmission mechanism (person-to-person, airborne,\n    waterborne, or other), combining social-media evidence with map,\n    population, and weather context to support resource deployment\n    decisions\"\n\n# ============================================================================\n# INPUT\n# ============================================================================\n\nartifact D_microblogs : entities\n  origin: given\n  internal structure: elementary\n  embedment: {set, space, time}\n  features:\n    - id: text_content\n      value structure: atomic\n      value type: text\n      description: \"Free text content of the message\"\n    - id: location\n      value structure: atomic\n      value type: spatial\n      description: \"GPS coordinates of posting\"\n    - id: timestamp\n      value structure: atomic\n      value type: temporal\n      description: \"Posting time\"\n  description: \"Geolocated microblog messages posted from mobile devices\n    over the outbreak period\"\n\nartifact D_zones : entities\n  origin: given\n  internal structure: region\n  embedment: space\n  features:\n    - id: population\n      value structure: atomic\n      value type: numeric\n      description: \"Resident population of the zone\"\n    - id: zone_name\n      value structure: atomic\n      value type: categorical\n      description: \"Zone identifier/name\"\n  description: \"13 city zones with population statistics, used as spatial\n    units for incidence normalisation\"\n\nartifact D_weather : entities\n  origin: given\n  internal structure: elementary\n  embedment: time\n  features:\n    - id: wind_speed\n      value structure: atomic\n      value type: numeric\n      description: \"Daily wind speed\"\n    - id: wind_direction\n      value structure: atomic\n      value type: numeric\n      description: \"Daily wind direction\"\n  description: \"Daily weather observations over the outbreak period\"\n\nartifact D_map_context : entities\n  origin: given\n  internal structure: elementary\n  embedment: space\n  features:\n    - id: layer_type\n      value structure: atomic\n      value type: categorical\n      description: \"Map layer category: highway, hospital, landmark,\n        water_body\"\n    - id: geometry\n      value structure: atomic\n      value type: spatial\n      description: \"Geometry of the map feature\"\n  description: \"Static geographic layers of the metropolitan area (road\n    network, hospitals, landmarks, water bodies), used as spatial reference\n    context for mapping and mechanism analysis\"\n\nartifact S_keyword_spec : specification\n  origin: given\n  representation form: \"keyword lexicon\"\n  description: \"Initial lexicon of flu-like symptom, severity, and\n    death-related terms used to identify illness-related messages\"\n\nartifact K_domain_transmission_knowledge : knowledge(D_weather, D_map_context)\n  origin: given\n  representation form: \"domain rules\"\n  description: \"Epidemiological domain knowledge describing expected\n    spatial-temporal signatures of airborne, waterborne, and\n    person-to-person transmission, used to interpret observed spread\n    patterns\"\n\n# ============================================================================\n# STEP 1: EXTRACT AND FILTER ILLNESS-RELATED REPORTS\n# ============================================================================\n\ntransform T_extract_symptom_signal :\n  intent: characterise\n  manner: \"keyword/text feature extraction\"\n  input: D_microblogs, S_keyword_spec\n  output: F_symptom_signal\n  actor: machine\n  description: \"Match message text against the keyword lexicon to derive\n    indicators of symptom mention, severity, and death-related content\"\n\nartifact F_symptom_signal : feature(D_microblogs)\n  value structure: vector\n  value type: categorical\n  representation form: \"boolean indicators for symptom mention, severity\n    keywords, and death-related keywords\"\n  description: \"Text-derived illness-indicator features per message\"\n\ntransform T_filter_illness_reports :\n  intent: define-unit\n  manner: \"filter\"\n  input: D_microblogs, F_symptom_signal\n  output: D_illness_reports\n  actor: machine\n  description: \"Select messages whose content indicates flu-like illness\"\n\nartifact D_illness_reports : entities\n  internal structure: elementary\n  embedment: {set, space, time}\n  description: \"Geolocated, timestamped messages indicative of flu-like\n    illness\"\n\n# ============================================================================\n# STEP 2: FILTER REFINEMENT LOOP\n# ============================================================================\n\nloop L_filter_refinement:\n  purpose: \"Refine the keyword lexicon and filtering criteria so the\n    illness-report set is a reliable proxy for actual illness incidence\"\n  until: \"Visual inspection confirms filtered reports are plausibly\n    illness-related and their spatial-temporal density looks consistent\n    with a genuine outbreak signal rather than noise\"\n  body:\n\n    transform T_contextualise_reports_map :\n      intent: contextualise\n      manner: \"map-based\"\n      input: D_illness_reports, D_map_context\n      output: A_reports_map\n      actor: machine\n      description: \"Position illness reports on the metropolitan map\"\n\n    artifact A_reports_map : arrangement(D_illness_reports)\n      context: D_map_context\n      principle: \"geographic coordinates\"\n      description: \"Spatial placement of illness reports relative to\n        roads, hospitals, landmarks, and water bodies\"\n\n    transform T_visualise_reports :\n      intent: visualise\n      manner: \"coloured points on map with time slider\"\n      input: A_reports_map, D_illness_reports\n      output: V_reports_check\n      actor: machine\n      description: \"Display raw spatial-temporal distribution of filtered\n        reports for inspection of content and density\"\n\n    artifact V_reports_check : visualisation(A_reports_map, D_illness_reports)\n      layout: \"map with time slider\"\n      form: \"coloured points\"\n      encoding: \"position from A_reports_map; colour/opacity from\n        timestamp recency\"\n      description: \"Interactive view for judging plausibility of the\n        filtered illness signal\"\n\n    transform T_assess_filter :\n      intent: assess\n      manner: \"judge relevance and noise level of filtered reports\"\n      input: V_reports_check, F_symptom_signal\n      output: K_filter_quality\n      actor: human\n      description: \"Assess whether filtered reports plausibly reflect\n        genuine illness incidence or contain excessive noise/false\n        positives\"\n\n    artifact K_filter_quality : knowledge(D_illness_reports, F_symptom_signal)\n      representation form: \"quality judgment\"\n      description: \"Judgment of filtering adequacy and need for lexicon\n        refinement\"\n\n    if K_filter_quality indicates refinement needed:\n      then:\n        transform T_refine_keywords :\n          intent: generate-knowledge\n          manner: \"formulate methodological decision\"\n          input: K_filter_quality, F_symptom_signal\n          output: S_keyword_spec_r\n          actor: human\n          description: \"Revise keyword lexicon/filtering rules based on\n            observed false positives/negatives\"\n\n        artifact S_keyword_spec_r : specification\n          representation form: \"keyword lexicon\"\n          description: \"Revised keyword lexicon for illness-indicative\n            content\"\n\n        transform T_extract_symptom_signal_r :\n          intent: characterise\n          manner: \"keyword/text feature extraction\"\n          input: D_microblogs, S_keyword_spec_r\n          output: F_symptom_signal_r\n          actor: machine\n          description: \"Re-extract illness-indicator features using the\n            revised lexicon\"\n\n        artifact F_symptom_signal_r : feature(D_microblogs)\n          value structure: vector\n          value type: categorical\n          description: \"Updated illness-indicator features per message\"\n\n        transform T_filter_illness_reports_r :\n          intent: define-unit\n          manner: \"filter\"\n          input: D_microblogs, F_symptom_signal_r\n          output: D_illness_reports_r\n          actor: machine\n          description: \"Re-select illness-related messages using updated\n            features\"\n\n        artifact D_illness_reports_r : entities\n          internal structure: elementary\n          embedment: {set, space, time}\n          description: \"Updated set of illness-related messages\"\n\n        assign:\n          S_keyword_spec := S_keyword_spec_r\n          F_symptom_signal := F_symptom_signal_r\n          D_illness_reports := D_illness_reports_r\n      else:\n        exit loop L_filter_refinement\n\nend loop L_filter_refinement\n\n# ============================================================================\n# STEP 3: SPATIAL-TEMPORAL FOOTPRINT AND ORIGIN IDENTIFICATION\n# ============================================================================\n\ntransform T_aggregate_zone_counts :\n  intent: characterise\n  manner: \"aggregate\"\n  input: D_illness_reports, D_zones\n  output: F_case_counts\n  actor: machine\n  description: \"Spatially join illness reports to zones and aggregate\n    daily case counts per zone\"\n\nartifact F_case_counts : feature(D_zones)\n  value structure: vector\n  value type: numeric\n  representation form: \"daily case-count time series per zone\"\n  description: \"Daily number of illness reports per zone\"\n\ntransform T_normalise_incidence :\n  intent: characterise\n  manner: \"compute-statistics (per-capita normalisation)\"\n  input: F_case_counts, D_zones\n  output: F_incidence_rate\n  actor: machine\n  description: \"Normalise daily case counts by zone population to obtain\n    comparable per-capita incidence rates\"\n\nartifact F_incidence_rate : feature(D_zones)\n  value structure: vector\n  value type: numeric\n  representation form: \"daily per-capita incidence rate time series per\n    zone\"\n  description: \"Population-normalised daily illness incidence per zone\"\n\ntransform T_visualise_incidence_spread :\n  intent: visualise\n  manner: \"animated choropleth map with time slider\"\n  input: D_zones, F_incidence_rate, D_map_context\n  output: V_incidence_map\n  actor: machine\n  description: \"Show spatial-temporal progression of normalised illness\n    incidence across zones and days\"\n\nartifact V_incidence_map : visualisation(D_zones, F_incidence_rate, D_map_context)\n  layout: \"map with time slider\"\n  form: \"choropleth coloured zones\"\n  encoding: \"zone geometry from D_map_context; colour intensity from\n    F_incidence_rate per day\"\n  description: \"Reveals onset location and diffusion pattern of the\n    outbreak\"\n\ntransform T_abstract_origin_pattern :\n  intent: abstract\n  manner: \"perception-and-interpretation\"\n  input: V_incidence_map, V_reports_check\n  output: P_outbreak_origin\n  actor: human\n  description: \"Identify the zone(s) and approximate time where the\n    outbreak appears to have started, and characterise the overall\n    spatial diffusion pattern\"\n\nartifact P_outbreak_origin : pattern(D_zones, D_illness_reports)\n  representation form: \"spatial-temporal description of earliest cluster\n    and diffusion direction\"\n  description: \"Candidate outbreak origin (zone/time) and qualitative\n    description of how the outbreak has spread so far\"\n\n# ============================================================================\n# STEP 4: TRANSMISSION-MECHANISM ANALYSIS LOOP\n# ============================================================================\n\nartifact S_mechanism_spec : specification\n  origin: given\n  representation form: \"analysis scope settings\"\n  description: \"Initial scope for transmission-mechanism analysis: full\n    time period, all zones, primary map layers (water bodies, road\n    network)\"\n\nloop L_transmission_analysis:\n  purpose: \"Iteratively test and refine mechanism-specific evidence until\n    the spread pattern is clearly best explained by one (or a ranked set\n    of) transmission mechanism(s)\"\n  until: \"Assessment yields a clear, defensible conclusion about the\n    dominant transmission pathway\"\n  body:\n\n    transform T_characterise_wind_alignment :\n      intent: characterise\n      manner: \"define-relations (directional correlation)\"\n      input: P_outbreak_origin, D_illness_reports, D_weather, S_mechanism_spec\n      output: F_wind_alignment\n      actor: machine\n      description: \"Compute daily alignment between the direction of case\n        spread from the origin and prevailing wind direction/speed\n        (airborne-transmission signature)\"\n\n    artifact F_wind_alignment : feature(D_zones)\n      value structure: vector\n      value type: numeric\n      representation form: \"daily wind-spread alignment score per zone\"\n      description: \"Evidence for airborne transmission\"\n\n    transform T_characterise_water_proximity :\n      intent: characterise\n      manner: \"compute-statistics (spatial distance)\"\n      input: D_illness_reports, D_map_context, S_mechanism_spec\n      output: F_water_proximity\n      actor: machine\n      description: \"Compute distance of illness-report locations to\n        nearest water body/water infrastructure (waterborne-transmission\n        signature)\"\n\n    artifact F_water_proximity : feature(D_illness_reports)\n      value structure: atomic\n      value type: numeric\n      description: \"Evidence for waterborne transmission\"\n\n    transform T_characterise_diffusion_shape :\n      intent: characterise\n      manner: \"define-relations (spatial diffusion pattern)\"\n      input: D_illness_reports, D_zones, D_map_context, S_mechanism_spec\n      output: F_diffusion_shape\n      actor: machine\n      description: \"Characterise zone-to-zone spread over time relative to\n        population density and road connectivity, distinguishing gradual\n        contact-like diffusion (person-to-person) from near-simultaneous\n        onset in disconnected zones (point-source)\"\n\n    artifact F_diffusion_shape : feature(D_zones)\n      value structure: relational configuration\n      representation form: \"time-stamped zone-adjacency graph weighted by\n        case-onset lag\"\n      description: \"Evidence distinguishing person-to-person from\n        point-source spread\"\n\n    transform T_visualise_mechanism_overlays :\n      intent: visualise\n      manner: \"coordinated overlay views\"\n      input: P_outbreak_origin, F_wind_alignment, F_water_proximity,\n             F_diffusion_shape, D_map_context\n      output: V_transmission_overlays\n      actor: machine\n      description: \"Overlay wind vectors, water-proximity gradient, and\n        zone-connectivity graph on the map for visual comparison against\n        candidate transmission signatures\"\n\n    artifact V_transmission_overlays : visualisation(P_outbreak_origin,\n        F_wind_alignment, F_water_proximity, F_diffusion_shape, D_map_context)\n      layout: \"map with wind-vector, water-layer, and zone-adjacency\n        overlays, small multiples per day\"\n      form: \"vector arrows, coloured zones, network edges\"\n      encoding: \"wind arrows from F_wind_alignment; water-proximity colour\n        gradient from F_water_proximity; connectivity edges from\n        F_diffusion_shape\"\n      description: \"Visual comparison of observed spread against airborne,\n        waterborne, and person-to-person signatures\"\n\n    transform T_assess_transmission_hypotheses :\n      intent: assess\n      manner: \"compare alternative results produced under different\n        specifications\"\n      input: V_transmission_overlays, F_wind_alignment, F_water_proximity,\n             F_diffusion_shape, K_domain_transmission_knowledge\n      output: K_transmission_evidence\n      actor: human\n      description: \"Judge which candidate transmission mechanism(s) best\n        explain the observed spread, informed by domain knowledge of\n        typical mechanism signatures; determine if evidence is conclusive\"\n\n    artifact K_transmission_evidence : knowledge(F_wind_alignment,\n        F_water_proximity, F_diffusion_shape)\n      representation form: \"comparative quality judgment\"\n      description: \"Evaluation of which transmission mechanism(s) are\n        best supported by current evidence, and whether further analysis\n        is needed\"\n\n    if K_transmission_evidence indicates refinement needed:\n      then:\n        transform T_adjust_analysis_scope :\n          intent: generate-knowledge\n          manner: \"formulate methodological decision\"\n          input: K_transmission_evidence\n          output: S_mechanism_spec_r\n          actor: human\n          description: \"Decide how to refine the mechanism analysis, e.g.\n            narrow time window to early outbreak days, focus on specific\n            zones, or incorporate additional map layers\"\n\n        artifact S_mechanism_spec_r : specification\n          representation form: \"analysis scope settings\"\n          description: \"Revised scope for transmission-mechanism analysis\"\n\n        assign:\n          S_mechanism_spec := S_mechanism_spec_r\n      else:\n        exit loop L_transmission_analysis\n\nend loop L_transmission_analysis\n\n# ============================================================================\n# STEP 5: SYNTHESISE FINDINGS\n# ============================================================================\n\ntransform T_synthesise_findings :\n  intent: generate-knowledge\n  manner: \"formulate-statements\"\n  input: P_outbreak_origin, K_transmission_evidence, K_filter_quality\n  output: K_outbreak_findings\n  actor: human\n  description: \"Synthesise conclusions about the outbreak's spatial-temporal\n    origin and its most plausible transmission mechanism(s), to inform\n    prioritisation of emergency-management resources\"\n\nartifact K_outbreak_findings : knowledge(D_illness_reports, D_zones,\n    D_weather, D_map_context)\n  representation form: \"statements and recommendations\"\n  description: \"Conclusions on outbreak origin location/time and dominant\n    transmission mechanism, with implications for resource deployment\"\n```",
      "role": "assistant"
    }
  ]
}