name: agenfk-flow description: Interactively create or edit an AgenFK workflow flow in chat. compatibility: opencode metadata: framework: agenfk category: flow-management
AgenFK Flow Manager
This skill guides you through creating or editing a custom workflow flow for an AgenFK project. A flow defines the ordered steps (statuses) that items move through — replacing the default TODO → IN_PROGRESS → REVIEW → TEST → DONE pipeline with a tailored one for your team.
How to use this skill
Invoke this skill by running the /agenfk-flow slash command or by asking:
"Help me create a new flow" / "I want to set up a custom workflow"
Conversation Protocol
Follow these steps in order. Ask one section at a time — do not dump all questions at once.
Use the Question UI (default_api:question) to collect each input interactively.
Step 1 — Identify the project
- Check for
.agenfk/project.jsonin the working directory to get theprojectId. - If not found, call
list_projects()via MCP and use the Question UI to ask which project. - Confirm: "I'll create this flow for project [name] (
[projectId]). Is that correct?"
Step 2 — Flow identity
Use Question UI to ask:
- Flow name (required, machine-safe, e.g.
security-review,ml-training): no spaces, lowercase-hyphenated recommended. - Description (optional): one sentence describing when to use this flow.
Step 3 — Collect steps
Explain to the user:
"A flow is a sequence of steps. Each step represents a status an item can be in. You need at least 2 steps. The last step is usually a terminal step (equivalent to DONE). Tell me about each step one at a time, or give me the full list at once."
For each step, collect via Question UI:
| Field | Required | Notes |
|---|---|---|
name |
Yes | Machine-safe identifier, e.g. IN_PROGRESS, QA, SHIPPED |
label |
No | Human-friendly display name (defaults to name) |
exitCriteria |
No | What must be true before leaving this step |
isSpecial |
No | true if this is a terminal/archive step (like DONE) |
Steps are automatically ordered in the sequence you provide them.
Example steps for a security-focused flow:
TODO— "Not started"IN_PROGRESS— "Being implemented"SEC_REVIEW— "Security review", exitCriteria: "No critical CVEs, signed off by security team"STAGING— "Deployed to staging", exitCriteria: "All integration tests pass on staging"DONE— "Released", isSpecial: true
Step 4 — Preview and confirm
Display the collected flow as a table:
Flow: [name]
Description: [description]
Order | Name | Label | Exit Criteria | Terminal?
------|--------------|------------------|----------------------------------|----------
1 | TODO | Not started | | No
2 | IN_PROGRESS | In progress | | No
...
Use Question UI to ask: "Does this look right? (yes / edit / cancel)"
Step 5 — Create the flow
Once confirmed, use the server REST API directly:
curl -s -X POST http://localhost:3000/flows \
-H "Content-Type: application/json" \
-d '{"name":"<name>","description":"<desc>","projectId":"<id>","steps":[...]}'
Or via CLI:
agenfk flow create "<name>"
Display every MCP call parameter and return value (Opencode transparency requirement).
Step 6 — Optionally activate the flow for the project
Use Question UI: "Would you like to activate this flow for project [name] now? (yes/no)"
If yes:
agenfk flow use <flowId> --project <projectId>
Or via REST:
curl -s -X POST http://localhost:3000/projects/<projectId>/flow \
-H "Content-Type: application/json" \
-d '{"flowId":"<flowId>"}'
Step 7 — Summary
Report back:
- Flow ID and name
- Number of steps created
- Whether it was activated for the project
- CLI command to inspect it:
agenfk flow show <flowId>
Editing an existing flow
If the user wants to edit a flow instead of creating one:
- List flows:
agenfk flow listorGET /flows - Show the target flow:
agenfk flow show <id> - Run:
agenfk flow edit <id>— or usePUT /flows/<id>via REST with the full updated flow body. - Confirm changes.
Notes
- Flow names must be unique within a project.
- The
workflow_gatekeeperMCP tool returns the active flow's steps — all platforms benefit automatically once a flow is activated. - To reset a project back to the default flow:
agenfk flow reset --project <projectId> - To share a flow with the community:
agenfk flow publish <flowId>