# SPDX-License-Identifier: Apache-2.0
# © SuperNovae Studio · nika.sh/library
nika: v1
workflow:
  id: meeting-actions
# local model · the recording stays yours
model: ollama/llama3.2:3b

# the file IS the blast radius
permits:
  fs: { read: [ ./transcript.txt ], write: [ ./action-items.json ] }
  tools: [ "nika:read", "nika:write" ]

tasks:
  transcript:
    invoke: { tool: "nika:read", args: { path: ./transcript.txt } }

  extract:
    with:
      transcript: ${{ tasks.transcript.output }}
    infer:
      prompt: "Extract every action item with its owner: ${{ with.transcript }}"
      schema:
        type: object
        required: [ actions ]
        properties:
          actions:
            type: array
            items:
              type: object
              required: [ owner, task ]
              properties:
                owner: { type: string }
                task: { type: string }
      max_tokens: 400

  save:
    with:
      extract: ${{ tasks.extract.output }}
    invoke:
      tool: "nika:write"
      args: { path: ./action-items.json, content: "${{ with.extract }}" }

outputs:
  actions: "${{ tasks.extract.output }}"
