# SPDX-License-Identifier: Apache-2.0
# © SuperNovae Studio · nika.sh/library
nika: v1
workflow:
  id: standup-digest
# local model · your commits never leave
model: ollama/llama3.2:3b

# the file IS the blast radius
permits:
  exec: [ git ]
  fs: { write: [ ./standup-note.md ] }
  tools: [ "nika:date", "nika:write" ]

tasks:
  # no dependency · the engine runs them together
  today:
    invoke: { tool: "nika:date", args: { op: now } }

  history:
    exec: { command: [ git, log, --since=yesterday, --oneline, --no-merges ] }

  digest:
    with:
      today: ${{ tasks.today.output }}
      history: ${{ tasks.history.output }}
    infer:
      prompt: |
        Date: ${{ with.today }}
        Commits since yesterday:
        ${{ with.history }}

        Write my standup note, 3 bullets: done / doing / blocked.
        Plain words, no fluff.
      max_tokens: 300

  save:
    with:
      digest: ${{ tasks.digest.output }}
    invoke:
      tool: "nika:write"
      args: { path: ./standup-note.md, content: "${{ with.digest }}" }

outputs:
  note: "${{ tasks.digest.output }}"
