taskflow
하는 일
이 스킬은 여러 백그라운드 작업에 걸치지만 여전히 하나의 소유자에 속하는 긴 작업을 AI가 관리하도록 합니다. 백그라운드 작업을 하나의 작업으로 추적하고, 재개하고, 보고받고 싶은 사람들을 위한 스킬입니다.
사용하는 경우
- ✓여러 백그라운드 작업이 필요하지만 하나의 작업으로 보여야 할 때.
- ✓작업이 다음으로 가기 전에 답변이나 다른 작업을 기다려야 할 때.
- ✓재시작 후에도 긴 작업이 살아남아 깔끔하게 보고해야 할 때.
스킬 링크
https://github.com/spinabot/brigade/blob/main/skills/taskflow/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 주간 지표를 여러 단계로 모으는 백그라운드 작업을 실행하고, 끝나면 업데이트를 한 번 보내 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 현재 단계, 적은 양의 저장된 상태, 대기 조건을 추적하는 흐름 기록을 하나 만듭니다. 각 백그라운드 작업을 그 흐름에 연결해, 진행 상황과 완료 여부를 한곳에서 확인할 수 있게 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
TaskFlow
Use TaskFlow when a job needs to outlive one prompt or one detached run, but you still want one owner session, one return context, and one place to inspect or resume the work.
When to use it
- Multi-step background work with one owner
- Work that waits on detached ACP or subagent tasks
- Jobs that may need to emit one clear update back to the owner
- Jobs that need small persisted state between steps
- Plugin or tool work that must survive restarts and revision conflicts cleanly
What TaskFlow owns
- flow identity
- owner session and requester origin
currentStep,stateJson, andwaitJson- linked child tasks and their parent flow id
- finish, fail, cancel, waiting, and blocked state
- revision tracking for conflict-safe mutations
It does not own branching or business logic. Put that in Lobster, acpx, or the calling code.
Current runtime shape
Canonical plugin/runtime entrypoint:
api.runtime.tasks.flowapi.runtime.taskFlowstill exists as an alias, butapi.runtime.tasks.flowis the canonical shape
Binding:
api.runtime.tasks.flow.fromToolContext(ctx)when you already have trusted tool context withsessionKeyapi.runtime.tasks.flow.bindSession({ sessionKey, requesterOrigin })when your binding layer already resolved the session and delivery context
Managed-flow lifecycle:
createManaged(...)runTask(...)setWaiting(...)when waiting on a person or an external systemresume(...)when work can continuefinish(...)orfail(...)requestCancel(...)orcancel(...)when the whole job should stop
Design constraints
- Use managed TaskFlows when your code owns the orchestration.
- One-task mirrored flows are created by core runtime for detached ACP/subagent work; this skill is mainly about managed flows.
- Treat
stateJsonas the persisted state bag. There is no separatesetFlowOutputorappendFlowOutputAPI. - Every mutating method after creation is revision-checked. Carry forward the latest
flow.revisionafter each successful mutation. runTask(...)links the child task to the flow. Use it instead of manually creating detached tasks when you want parent orchestration.
Example shape
const taskFlow = api.runtime.tasks.flow.fromToolContext(ctx);
const created = taskFlow.createManaged({
controllerId: "my-plugin/inbox-triage",
goal: "triage inbox",
currentStep: "classify",
stateJson: {
businessThreads: [],
personalItems: [],
eodSummary: [],
},
});
const classify = taskFlow.runTask({
flowId: created.flowId,
runtime: "acp",
childSessionKey: "agent:main:subagent:classifier",
runId: "inbox-classify-1",
task: "Classify inbox messages",
status: "running",
startedAt: Date.now(),
lastEventAt: Date.now(),
});
if (!classify.created) {
throw new Error(classify.reason);
}
const waiting = taskFlow.setWaiting({
flowId: created.flowId,
expectedRevision: created.revision,
currentStep: "await_business_reply",
stateJson: {
businessThreads: ["slack:thread-1"],
personalItems: [],
eodSummary: [],
},
waitJson: {
kind: "reply",
channel: "slack",
threadKey: "slack:thread-1",
},
});
if (!waiting.applied) {
throw new Error(waiting.code);
}
const resumed = taskFlow.resume({
flowId: waiting.flow.flowId,
expectedRevision: waiting.flow.revision,
status: "running",
currentStep: "finalize",
stateJson: waiting.flow.stateJson,
});
if (!resumed.applied) {
throw new Error(resumed.code);
}
taskFlow.finish({
flowId: resumed.flow.flowId,
expectedRevision: resumed.flow.revision,
stateJson: resumed.flow.stateJson,
});
Keep conditionals above the runtime
Use the flow runtime for state and task linkage. Keep decisions in the authoring layer:
business→ post to Slack and waitpersonal→ notify the owner nowlater→ append to an end-of-day summary bucket
Operational pattern
- Store only the minimum state needed to resume.
- Put human-readable wait reasons in
blockedSummaryor structured wait metadata inwaitJson. - Use
getTaskSummary(flowId)when the orchestrator needs a compact health view of child work. - Use
requestCancel(...)when a caller wants the flow to stop scheduling immediately. - Use
cancel(...)when you also want active linked child tasks cancelled.
Examples
- See
skills/taskflow/examples/inbox-triage.lobster - See
skills/taskflow/examples/pr-intake.lobster - See `skills/taskflow-inbox-t
자주 묻는 질문
작업의 논리를 스킬이 정하나요?
아닙니다. 분기는 호출하는 코드나 별도의 워크플로 도구가 정하며, 이 스킬은 작업을 추적합니다.
재시작 후에는 어떻게 되나요?
흐름이 안정적으로 저장되므로, 작업은 처음부터 다시 시작하는 대신 이어서 재개할 수 있습니다.
최종 업데이트는 누가 받나요?
흐름은 작업을 시작한 원래 소유자 세션에 결과를 보고합니다.
상세 정보
작성자의 원본 설명
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
repo: spinabot/brigade
인기도
- GitHub 스타
- 11k
- 순위
- #11738
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
1password
11k에이전트가 1Password 명령줄 도구를 설정하고 안전하게 로그인하도록 가르친 뒤, 필요할 때 저장된 비밀 정보를 읽거나 넣도록 합니다.
apple-reminders
11k에이전트가 터미널에서 Apple 미리 알림을 보고, 추가하고, 수정하고, 완료하고, 삭제하도록 돕습니다. 목록과 날짜 필터도 포함합니다.
bluebubbles
11k에이전트가 BlueBubbles를 통해 iMessage를 보내고 관리하도록 돕습니다. 문자, 첨부 파일, 탭백 반응, 수정, 그룹 설정을 포함합니다.
camsnap
11k에이전트가 이미 설정한 네트워크 보안 카메라에서 스냅샷을 찍고, 짧은 클립을 녹화하거나, 움직임을 감시하도록 돕습니다.