본문으로 건너뛰기
cccskills
무료GitHub에 공개

orc-workflow

Build an ORC behavior tree workflow using the DSL

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Build an ORC Workflow

Build a behavior tree workflow using the ORC DSL. Read docs/DSL-REFERENCE.md for the full reference.

Require

(require '[ai.obney.orc.orc-service.interface :as orc])

Structure

Every workflow has three parts:

(orc/workflow "workflow-name"
  ;; 1. Blackboard (input/output schema)
  (orc/blackboard {:input-key :string
                   :output-key :string})

  ;; 2. Root node (tree structure)
  (orc/sequence "main"
    (orc/llm "step-1" ...)
    (orc/code "step-2" ...)))

Node Types

LLM Node (call an LLM)

(orc/llm "summarize"
  :instruction "Summarize the input text in 2 sentences."
  :reads [:input-text]
  :writes [:summary]
  :model "google/gemini-2.0-flash-001")  ;; optional, uses default if omitted

Code Node (execute a Clojure function)

;; :fn must be a fully-qualified function name (resolved at runtime)
;; The function receives {:keys [inputs]} and returns {:key value}
(orc/code "transform"
  :fn "my.ns/transform-fn"
  :reads [:raw-data]
  :writes [:processed-data])

Sequence (run children in order, fail on first failure)

(orc/sequence "pipeline"
  (orc/llm "extract" ...)
  (orc/code "validate" ...)
  (orc/llm "respond" ...))

Fallback (try alternatives until one succeeds)

(orc/fallback "with-retry"
  (orc/llm "try-gpt4" :model "openai/gpt-4o" ...)
  (orc/llm "try-gemini" :model "google/gemini-2.0-flash-001" ...))

Parallel (run children concurrently)

(orc/parallel "gather"
  {:success-policy :all}  ;; :all, :any, or :majority
  (orc/llm "analysis-a" ...)
  (orc/llm "analysis-b" ...))

Map-Each (iterate over a collection)

(orc/map-each "process-items"
  :source-key :items         ;; blackboard key with the collection
  :item-key :current-item   ;; blackboard key for each item
  :output-key :results      ;; blackboard key for collected results
  (orc/llm "process-one" ...))

Condition (branch on a predicate)

(orc/condition "check-length"
  :check "(fn [bb] (> (count (:text bb)) 100))"
  :reads [:text])

LLM Condition (branch on LLM yes/no)

(orc/llm-condition "is-relevant?"
  :instruction "Is this text relevant to the user's question? Answer yes or no."
  :reads [:text :question])

Build and Execute

;; Build (stores in event store, returns sheet-id)
(def sheet-id (orc/build-workflow! ctx my-workflow))

;; Execute (blocking, returns result)
(orc/execute ctx sheet-id {:input-key "value"})
;; => {:status :success, :outputs {:output-key "result"}, :duration-ms 1234}

;; Execute with options
(orc/execute ctx sheet-id inputs :timeout-ms 60000)
(orc/execute ctx sheet-id inputs :use-version 2)

After a processor restart against the same durable event store, recover abandoned execution frontiers without creating replacement ticks:

(orc/resume-in-progress! ctx)

The recovery call is idempotent and preserves tick, sheet, node, and task-call identity. It is distinct from reconnecting a live stream, which does not replay history.

Key Rules

  • All node :reads and :writes must be declared in the blackboard
  • Blackboard keys are keywords throughout (schema, reads/writes, execute inputs/outputs)
  • Code node :fn must be a namespace-qualified symbol string, not inline code
  • build-workflow! is idempotent — same workflow name produces the same sheet-id, and unchanged definitions are a true no-op (zero events) via content hashing
  • Workflows are versioned — use orc/publish-version for production snapshots
  • Keep observability failure-isolated with orc/start-telemetry-exporter!; inspect retry/drop counters with orc/telemetry-exporter-stats and stop it explicitly

Judges (optional quality gates)

(orc/workflow "with-judges"
  (orc/blackboard {:question :string :answer :string})
  (orc/judges
    {:grounding {:type :grounding :weight 0.5}
     :completeness {:type :completeness :weight 0.5}})
  (orc/llm "answer"
    :instruction "Answer the question."
    :reads [:question]
    :writes [:answer]
    :judges [:grounding :completeness]))

Reference

  • docs/DSL-REFERENCE.md — Full DSL reference with examples
  • docs/ORC-SERVICE-GUIDE.md — Execution engine internals

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

allium

무료

Give your AI agents something more useful than a prompt. Velocity through clarity.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ObneyAI/orc222026년 10월 20일 업데이트

distill

무료

Extract an Allium specification from an existing codebase. Use when the user has existing code and wants to distil behaviour into a spec, reverse engineer a specification from implementation, generate a spec from code, turn implementation into a behavioural specification, or document what a codebase does in Allium terms.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ObneyAI/orc222026년 10월 20일 업데이트

elicit

무료

Run a structured discovery session to build an Allium specification through conversation. Use when the user wants to create a new spec from scratch, elicit or gather requirements, capture domain behaviour, specify a feature or system, define what a system should do, or is describing functionality and needs help shaping it into a specification.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ObneyAI/orc222026년 10월 20일 업데이트

Implement command handlers that validate state and emit events using the Grain framework

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ObneyAI/orc222026년 10월 20일 업데이트

Create scheduled background jobs that run on cron schedules

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ObneyAI/orc222026년 10월 20일 업데이트

Implement query handlers that read from event-sourced read models

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ObneyAI/orc222026년 10월 20일 업데이트

ObneyAI의 스킬 모두 보기

이 스킬의 문제 신고