← Situational Knowledge Academy

Build a contextual knowledge collection · 5 / 5

Bring in a CSV of press observations

Grow the collection with two reviewable proposals from a shift handover CSV.

YOUR TASK

Make this happen

3 steps
  1. Expand notes.csv with for_each = csv({ path = "notes.csv", key = "code" }).

  2. Map each.value.entity_id and each.value.body into ENTITY notes.

  3. Keep both imported proposals TENANT/PENDING/CHAT_DISTILLED and preserve all earlier resources.

This step starts with the earlier solution and one new challenge. Each lesson keeps its own draft.

Read the starter files

concept.cococo

concept "roller" {
  label = "Roller Jamming"
  conceptKind = "failure-mode"
}

main.cococo

knowledge_note "setup" {
  kind = "CONCEPT"
  body = "In high humidity, warm the shop before a long run to reduce roller jams."
  scope = "TENANT"
  status = "PENDING"
  provenance = "CHAT_DISTILLED"
  conceptId = concept.roller.id
}

personal.cococo

knowledge_note "my_shift" {
  kind = "CONCEPT"
  body = "For my morning shift, ask the shift lead to check humidity before warming the shop."
  scope = "PERSONAL"
  status = "PENDING"
  provenance = "CHAT_DISTILLED"
  conceptId = concept.roller.id
}

press.cococo

knowledge_note "press_a" {
  kind = "ENTITY"
  body = "On Press A, ask the shift lead to inspect the red roller before the first long run."
  scope = "TENANT"
  status = "PENDING"
  provenance = "CHAT_DISTILLED"
  entityId = "wcr_01k00000000000000000000001"
}

import.cococo

knowledge_note "imported" {
  # TODO: add for_each — see the task above.
  kind = "ENTITY"
  # Supplied entityId: each.value.entity_id
  # TODO: assign entityId using the value above.
  # Supplied body: each.value.body
  # TODO: assign body using the value above.
  # TODO: add scope — see the task above.
  # TODO: add status — see the task above.
  # TODO: add provenance — see the task above.
}

notes.csv

code,entity_id,body
press_b,wcr_01k00000000000000000000002,"On Press B, check the feeder alignment before the first run."
press_c,wcr_01k00000000000000000000003,"On Press C, ask the shift lead to review the humidity log."

Reference: knowledge · authoring