跳转至

Acquired

This graph starts from an approved company topic, gathers source-backed research from the web, produces a three-act podcast script, and generates separate Audio Director manifests for the host and guest.

The contract path uses fixed material. The live path requires working Codex credentials and network access to the domains allowed by the research Rules.

Acquired research and production graph

Complete graph definition

The runnable configuration contains six parallel research branches, an evidence gate, three parallel writing branches, and two audio-manifest outputs. You can also download the raw YAML.

version: 1
project:
  name: acquired-podcast
  default_targets: [audio_manifest_host, audio_manifest_guest]
slots:
  topic_prompt: { kind: file, path: fixtures/topic.md }
  gate_request: { kind: file, path: fixtures/gate-request.json }
  topic: { kind: file, path: topic.md }
  origins: { kind: file, path: research/origins.json }
  business_model: { kind: file, path: research/business-model.json }
  product: { kind: file, path: research/product.json }
  competition: { kind: file, path: research/competition.json }
  leadership: { kind: file, path: research/leadership.json }
  inflections: { kind: file, path: research/inflections.json }
  research_gate: { kind: file, path: research-gate.json }
  supplement: { kind: file, path: research/supplement.json }
  meeting: { kind: file, path: production-meeting.md }
  act_one: { kind: file, path: script/act-one.md }
  act_two: { kind: file, path: script/act-two.md }
  act_three: { kind: file, path: script/act-three.md }
  draft_script: { kind: file, path: episode-draft.md }
  script: { kind: file, path: episode.md }
  qa: { kind: file, path: fixtures/qa.bootstrap.json }
  qa_result: { kind: file, path: qa.json }
  audio_manifest_host: { kind: file, path: audio-director-host.json }
  audio_manifest_guest: { kind: file, path: audio-director-guest.json }
rules:
  - id: choose_topic
    in: [topic_prompt]
    out: [topic]
    run: { using: human, command: "Approve the exact company topic file" }
  - id: research_origins
    in: [topic]
    out: [origins]
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Research the origins and founding history of the company named in
        in/topic using live web sources. Write only out/origins as JSON with
        dimension, summary, claims, and sources. sources must contain at least
        two objects with url, title, retrieved_at, and evidence fields. Every
        material claim must be supported by those sources; do not use prior
        knowledge as unrecorded evidence.
  - id: research_business_model
    in: [topic]
    out: [business_model]
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Research how the company in in/topic makes money, allocates capital,
        and reports its operating segments using live web sources. Write only
        out/business_model as JSON with dimension, summary, claims, and sources.
        sources must contain at least two objects with url, title, retrieved_at,
        and evidence fields. Bind every claim to recorded evidence.
  - id: research_product
    in: [topic]
    out: [product]
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Research the company's principal products, services, and customer value
        from live web sources. Write only out/product as JSON with dimension,
        summary, claims, and sources. sources must contain at least two objects
        with url, title, retrieved_at, and evidence fields. Do not emit an
        unsupported product list.
  - id: research_competition
    in: [topic]
    out: [competition]
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Research the company's competitive landscape and defensibility using
        live web sources. Write only out/competition as JSON with dimension,
        summary, claims, and sources. sources must contain at least two objects
        with url, title, retrieved_at, and evidence fields. Separate sourced
        facts from analysis.
  - id: research_leadership
    in: [topic]
    out: [leadership]
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Research the leadership history, governance, and succession of the
        company in in/topic using live web sources. Write only out/leadership as
        JSON with dimension, summary, claims, and sources. sources must contain
        at least two objects with url, title, retrieved_at, and evidence fields.
  - id: research_inflections
    in: [topic]
    out: [inflections]
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Research the decisive strategic inflection points in the company's
        history using live web sources. Write only out/inflections as JSON with
        dimension, summary, claims, and sources. sources must contain at least
        two objects with url, title, retrieved_at, and evidence fields, and each
        inflection must include a date and sourced consequence.
  - id: supplement_competition
    in: [topic, competition, gate_request]
    out: [supplement]
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Read in/gate_request and in/competition, perform the requested targeted
        follow-up research about in/topic, and write only out/supplement as JSON
        with status equal to complete, dimension, request, findings, and sources.
        sources must contain at least two source objects with URLs and evidence.
  - id: review_research
    in: [origins, business_model, product, competition, leadership, inflections, supplement, gate_request]
    out: [research_gate]
    run: >-
      for artifact in in/origins in/business_model in/product in/competition in/leadership in/inflections;
      do jq -e '(.sources | length) >= 2 and (.summary | length) > 0' "$artifact" >/dev/null || exit 1; done;
      jq -e '.status == "complete" and (.sources | length) >= 2' in/supplement >/dev/null;
      jq -n --arg request "$(jq -r '.request' in/gate_request)"
      '{decision:"accept",round:2,request:$request}' > out/research_gate
  - id: production_meeting
    in: [topic, origins, business_model, product, competition, leadership, inflections, supplement, research_gate]
    out: [meeting]
    when: "test \"$(jq -r '.decision' research_gate)\" = accept"
    permissions: { network: none, secrets: [] }
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Synthesize the accepted source-backed research in the declared inputs.
        Write only out/meeting as a three-act production brief with the central
        thesis, narrative tension, evidence assigned to each act, and source
        URLs beside the claims they support.
  - id: write_act_one
    in: [meeting, origins, business_model]
    out: [act_one]
    permissions: { network: none, secrets: [] }
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Write only out/act_one from the supplied production brief, origins, and
        business-model evidence. Preserve source URLs inline and distinguish
        narration from host dialogue.
  - id: write_act_two
    in: [meeting, product, competition]
    out: [act_two]
    permissions: { network: none, secrets: [] }
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Write only out/act_two from the supplied production brief, product, and
        competition evidence. Preserve source URLs inline and build the central
        strategic tension without inventing facts.
  - id: write_act_three
    in: [meeting, leadership, inflections]
    out: [act_three]
    permissions: { network: none, secrets: [] }
    run:
      using: codex
      model: gpt-5.6-luna
      reasoning_effort: none
      command: >-
        Write only out/act_three from the supplied production brief, leadership,
        and inflection evidence. Preserve source URLs inline and close the thesis
        with sourced consequences.
  - id: assemble_episode
    in: [act_one, act_two, act_three]
    out: [draft_script]
    run: "cat in/act_one in/act_two in/act_three > out/draft_script"
  - id: revise_episode
    in: [draft_script, qa]
    out: [script]
    when: "decision=$(jq -r '.decision' qa); test \"$decision\" = pending || test \"$decision\" = revise"
    run: "{ cat in/draft_script; printf '\nRevision applied: source transitions verified.\n'; } > out/script"
  - id: qa_episode
    in: [script, qa]
    out: [qa_result]
    run: >-
      if grep -Eq 'https?://' in/script && grep -q 'Revision applied' in/script;
      then printf '{"decision":"accept","round":2}\n';
      else printf '{"decision":"revise","round":1}\n'; fi > out/qa_result
  - id: direct_host_audio
    in: [script, qa_result]
    out: [audio_manifest_host]
    when: "test \"$(jq -r '.decision' qa_result)\" = accept"
    run: >-
      jq -n --arg script "$(cksum in/script | cut -d' ' -f1)"
      '{schema:"audio-director/v1",voice:"host",script_checksum:$script,segments:["act_one","act_two","act_three"]}'
      > out/audio_manifest_host
  - id: direct_guest_audio
    in: [script, qa_result]
    out: [audio_manifest_guest]
    when: "test \"$(jq -r '.decision' qa_result)\" = accept"
    run: >-
      jq -n --arg script "$(cksum in/script | cut -d' ' -f1)"
      '{schema:"audio-director/v1",voice:"guest",script_checksum:$script,segments:["act_one","act_two","act_three"]}'
      > out/audio_manifest_guest

What each Slot does

Slot Stage Role in the graph
topic_prompt input The company topic presented for approval.
gate_request input A bounded follow-up question required by the evidence gate.
topic scope The approved topic Revision read by every research Rule.
origins research Source-backed founding and early-history research.
business_model research Revenue, capital-allocation, and operating-segment research.
product research Product, service, and customer-value research.
competition research Competitive landscape and defensibility research.
leadership research Leadership, governance, and succession research.
inflections research Strategic inflections with dates and sourced consequences.
supplement research Targeted competition follow-up requested by the gate.
research_gate acceptance The decision written after validating the six reports and supplement.
meeting production A three-act production brief built from accepted evidence.
act_one writing Origins and business-model act.
act_two writing Product and competition act.
act_three writing Leadership and inflections act.
draft_script join Direct concatenation of the three acts.
script revision Episode script after source-transition revision.
qa input Bootstrap QA decision that allows pending or revise to trigger revision.
qa_result acceptance Machine check for source URLs and the revision marker.
audio_manifest_host output Audio Director manifest for the host voice.
audio_manifest_guest output Audio Director manifest for the guest voice.

What each Rule does

Rule Reads Writes Work
choose_topic topic_prompt topic Asks a person to approve the exact topic file.
research_origins topic origins Researches founding history and records at least two sources.
research_business_model topic business_model Researches revenue, capital allocation, and segments.
research_product topic product Researches products, services, and customer value.
research_competition topic competition Researches competition and separates sourced facts from analysis.
research_leadership topic leadership Researches leadership history, governance, and succession.
research_inflections topic inflections Researches strategic turning points with dates and consequences.
supplement_competition topic, competition, gate_request supplement Performs one bounded follow-up investigation.
review_research six reports, supplement, gate_request research_gate Uses jq to validate source counts, summaries, and supplement status.
production_meeting topic, all research, research_gate meeting Creates a three-act brief after the gate accepts.
write_act_one meeting, origins, business_model act_one Writes act one and preserves source URLs.
write_act_two meeting, product, competition act_two Writes act two around the central strategic tension.
write_act_three meeting, leadership, inflections act_three Writes act three with sourced consequences.
assemble_episode act_one, act_two, act_three draft_script Concatenates the three acts in order.
revise_episode draft_script, qa script Adds source-transition revision when QA is pending or revise.
qa_episode script, qa qa_result Checks for source URLs and the revision marker.
direct_host_audio script, qa_result audio_manifest_host Produces the host manifest after QA accepts.
direct_guest_audio script, qa_result audio_manifest_guest Produces the guest manifest after QA accepts.

The six research Rules share only topic, so they can run in parallel. The three writing Rules share meeting and can also run in parallel. The two manifests read the same accepted script without depending on each other.

Run and inspect it

Start with the contract profile.

scripts/test-real-world-cases.sh acquired-podcast contract

It preserves the same Slots, Rules, gate, and JSON schemas while using fixed inputs to test scheduling and recovery.

Run live research after preparing network access and Codex credentials.

scripts/test-real-world-cases.sh acquired-podcast live

Inspect the six files under research/. Each should contain at least two sources with URLs, titles, retrieval times, and evidence. Then inspect research-gate.json, the three acts, and both Audio Director manifests.