Skip to main content
T1 starter · marketing / creators — the diamond DAG. One read fans into three rewrites that run concurrently, and a single write merges the bundle. The craft lives in the prompts; the engine handles the choreography.

The job

You wrote the post. Now it needs to be a thread, a LinkedIn version and a newsletter blurb — same ideas, three voices. Sequential chatbot sessions drift; this file keeps one source and rewrites it three ways at once.

The shape

The file

t1-social-repurpose.nika.yaml
nika: v1
workflow: social-repurpose
description: "One post → thread + LinkedIn + newsletter, in parallel"

model: mock/echo            # swap for mistral/mistral-large or any provider

vars:
  post_path: "./blog/launch-post.md"

tasks:
  - id: post
    invoke:
      tool: "nika:read"
      args: { path: "${{ vars.post_path }}" }

  # Three rewrites · no deps between them · they run concurrently.
  - id: thread
    depends_on: [post]
    infer:
      prompt: "Turn this post into a 6-tweet thread · keep the voice · ${{ tasks.post.output }}"

  - id: linkedin
    depends_on: [post]
    infer:
      prompt: "Rewrite this post for LinkedIn · hook first · ${{ tasks.post.output }}"

  - id: newsletter
    depends_on: [post]
    infer:
      prompt: "Write a 3-sentence newsletter blurb for this post · ${{ tasks.post.output }}"

  - id: bundle
    depends_on: [thread, linkedin, newsletter]
    with:
      t: ${{ tasks.thread.output }}
      l: ${{ tasks.linkedin.output }}
      n: ${{ tasks.newsletter.output }}
    invoke:
      tool: "nika:write"
      args:
        path: "./social-bundle.md"
        content: |
          # Social bundle

          ## Thread
          ${{ with.t }}

          ## LinkedIn
          ${{ with.l }}

          ## Newsletter
          ${{ with.n }}

outputs:
  bundle_path: ${{ tasks.bundle.output }}

How it works

1

Fan-out by omission

thread, linkedin and newsletter each depend only on post — no deps between them, so the engine runs all three at the same time.
2

with: keeps the merge readable

bundle aliases the three outputs to one-letter names. with: is optional sugar — but a template interpolating three long task paths is where you want it.
3

One multi-line write

The content: is a YAML block scalar with three interpolations — the bundle file is assembled by the engine, no model needed for glue.

Constructs you just used

ConstructWhereReference
diamond fan-out / fan-inthe whole DAGWorkflows
with: aliasingbundleBindings
block-scalar content:bundle.argsYAML syntax

Make it yours

  • Add a fourth branch (YouTube description, Mastodon, press blurb) — it’s three lines and it runs in the same wave.
  • Pin a glossary: put your brand terms in a vars: entry and interpolate it into each prompt.
  • Want every language too? Chain this into Localization factory.

Level up · T2 chains

Next tier: typed outputs, in-place file edits and a webhook ping — release day, automated.