Templates / AI agent patterns / ai-prompt-chaining
AI Prompt Chaining
Splits writing an article into three model calls — outline, draft, edit — each fed the previous step's output. Between the first two sits a programmatic gate, a FEEL script that checks the outline before any more tokens are spent; an outline that fails the gate sends the brief back instead of producing a weak article.
Scenarios · 2
- The outline passes the gate and the article is written write-outline → check-outline → write-draft → edit-draft → article-ready
- A one-line outline fails the gate write-outline → check-outline → return-brief → brief-returned
Job types · 3
-
cms-draft-saveSave to CMS as draft -
io.camunda.agenticai:aiagent:1Write outline, Write draft, Edit for tone and length -
requester-notifyReturn brief to requester
Files · 2
- ai-prompt-chaining.bpmn Process model
- ai-prompt-chaining.bpmn.tests.json Test scenarios (runScenario format)
Every scenario passes on @bpmnkit/engine's runScenario in the
package's tests. casen template use ai-prompt-chaining [dir] writes the files above
into your project — see the templates guide for running
the scenarios and deploying.