{
"name": "coding-flow",
"description": "Plan and build with an approval gate.",
"context": "shared",
"start": "clone_repo",
"steps": {
"clone_repo": {
"type": "tool",
"tool": "clone_repository",
"input": {
"repoUrl": "https://github.com/acme/app.git",
"targetDir": "workspace/app"
},
"saveAs": "repo.clone",
"next": "plan"
},
"plan": {
"type": "agent",
"systemPrompt": "Create a short implementation plan.",
"tools": ["read", "grep"],
"next": "approval"
},
"approval": {
"type": "human",
"output": { "schema": { "decision": "string" } },
"next": [
{ "when": "approval.decision == 'approve'", "to": "build" },
{ "to": "end" }
]
},
"build": {
"type": "agent",
"systemPrompt": "Implement the approved plan.",
"tools": ["read", "write", "edit", "bash"],
"toolChoice": { "mode": "required", "tool": "bash" },
"next": "end"
}
},
"permissions": [
{
"id": "approve-shell",
"resource": "tool",
"effect": "approval",
"match": { "tool": "bash", "hook": "tool:before" },
"message": "Approve shell execution before build."
}
],
"hooks": {
"loop:start": [
{
"tool": "audit_event",
"input": { "event": "coding-flow-started" },
"saveAs": "audit.started"
}
],
"loop:end": [
{
"tool": "audit_event",
"input": { "event": "coding-flow-ended" },
"saveAs": "audit.ended",
"onError": "continue"
}
]
}
}