workflow-agent-kit
Skill78 starsChanged 5 months agoApache-2.0View on GitHub
Discover, inspect, convert, create, edit, validate, publish, start, advance, stop, resume, and recover public Workflows; connect to a LazyMind deployment to modify an existing database-backed Workflow through its authoring interface; manage durable Workflow Input Resources and versioned output Artifacts. Use whenever an Agent needs Workflow discovery, existing-Workflow inspection or revision, Skill-to-Workflow conversion, Workflow execution, step decisions, or Input Resource/Artifact inspection and revision.
In this repository6 other files it gives its agents.
- .cursor/rules/coding-standards.mdcCursor rule
- ui-resilient-accessibilitySkill
- ui-safe-form-patternsSkill
- ui-secure-reviewSkill
- image-prompt-craftSkill
- personal-document-searchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. About 0 are common, 10 are distinctive, and 20 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
20
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use only the public Workflow tools.
- Very specific: line 10
Never read or write Runtime tables or call a Host-private Workflow endpoint.
- Very specific: line 11
If public tools are unavailable, read references/installation-and-connection.md.
- Very specific: line 17
Use it when the user requests an end-to-end task.
- Very specific: line 45
When the Host exposes a trigger_<workflow>_workflow tool, its definition is a catalog-bound selection hint.
- Distinctive: line 53
When no matching trigger is exposed:
- Very specific: line 55
Call workflow_connection_status when the Host exposes it.
- Very specific: line 57
Call list_workflows for the authenticated catalog.
- Very specific: line 60
Call get_workflow with the exact returned id and pin its revision.
- Distinctive: line 61
Read its package scenario as Workflow-specific domain guidance.
- Very specific: line 68
When the user asks the external Agent to let LazyMind convert and execute the Skill end to end, prefer the hosted task tools:
- Very specific: line 71
Call start_skill_workflow_task with skill.name, exactly one Skill source (skill.url, local skill.zip_path, or skill.zip_base64), the user's …
- Very specific: line 81
When succeeded, call get_skill_workflow_result and return the summary, artifacts, and LazyMind link.
- Distinctive: line 88
Use the lower-level authoring procedure only when the user explicitly asks the Agent to author or edit package files itself.
- Very specific: line 91
Call list_skills, then preflight_skill_workflow_conversion for the chosen Skill.
- Very specific: line 93
Call get_skill_conversion_context for an immutable revision and tree hash.
- Very specific: line 97
Call create_workflow_draft with exactly those Agent-authored files and pinned Skill identity.
- Very specific: line 99
Call validate_workflow_draft and get_workflow_diagnostics.
- Distinctive: line 121
Read the existing draft and published-version metadata through public Workflow authoring tools or APIs.
- Very specific: line 137
Follow the identity, connection, input checklist, mutation boundaries, and publication decision table in …
- Distinctive: line 146
Use the Host framework's ordinary conversation-attachment tools to resolve each required user upload.
- Very specific: line 149
Call the exact catalog-bound trigger_<workflow>_workflow with material ids mapped to those framework-resolved file references.
- Distinctive: line 153
If the trigger reports missing inputs, resolve them through the Host framework and follow the returned binding guidance.
- Very specific: line 155
Use the trigger's returned projection as authority.
- Very specific: line 168
If the state changes between reading and submission, the Host refreshes and retries once when the same targets remain actionable.
- Distinctive: line 175
After completion, refresh projection and inspect required Artifacts.
- Very specific: line 177
Use advance_step_and_hand_off only when the Host profile exposes it and the durable Supervisor has accepted ownership.
- Very specific: line 193
Call patch_artifact with an exact selected Artifact handle and new value.
- Distinctive: line 198
If a revision or tombstone invalidates downstream output, target the earliest invalidated step and let Runtime propagate stale lineage.
- Distinctive: line 200
Never delete an Input Resource that is pinned to a Session.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Workflow Agent Kit
Use only the public Workflow tools. Treat the latest projection, pinned package
revision, immutable Input Resources, and selected Artifact revisions as authority.
Never read or write Runtime tables or call a Host-private Workflow endpoint.
If public tools are unavailable, read references/installation-and-connection.md.
Model boundary
For hosted conversion and execution, start_skill_workflow_task explicitly
delegates generation and execution to LazyMind's configured models and runtime.
Use it when the user requests an end-to-end task. Follow
references/external-agent-quickstart.md for setup and minimal calls.
For Agent-authored package files, perform interpretation, drafting, repair, and review in the already-active Agent. Authoring infrastructure only reads, validates, stores, compiles, and publishes exact data supplied by the Agent.
Outside hosted conversion, the permitted nested model path is an accepted
Workflow step executed as an explicit SubAgent by the framework Supervisor. Read
references/model-execution-boundary.md before execution or authoring.
Choose the procedure
- For discovery or selection, follow Discover a Workflow below.
- For inspecting or changing an existing deployed Workflow, read
references/existing-workflow-authoring.mdandreferences/installation-and-connection.mdcompletely. - For converting a Skill, read
references/skill-to-workflow.mdandreferences/workflow-format.mdcompletely. - For starting or advancing a run, read
references/lifecycle.md,references/decision-policy.md, andreferences/execution-policy.md. - For attachments or outputs, read
references/artifact-policy.md. - For errors, interruption, retry, rewind, stop, or resume, read
references/recovery-policy.md. - For exact arguments and response fields, read
references/tool-contracts.md.
Discover a Workflow
When the Host exposes a trigger_<workflow>_workflow tool, its definition is a
catalog-bound selection hint. Call the matching trigger directly instead of
list_workflows; it reads the exact public package and pinned revision. An explicit
user selection permits only its matching trigger. The trigger pins the revision,
performs preparation, creates the Session when inputs are sufficient, and returns
the authoritative projection, reachable_steps, ready_steps, and blocked_steps.
It never advances a step.
When no matching trigger is exposed:
- Call
workflow_connection_statuswhen the Host exposes it. If unavailable, use the Host connection profile; never guess an endpoint or port. - Call
list_workflowsfor the authenticated catalog. - Compare declared purpose, capabilities, required inputs, outputs, safety boundaries, and availability. Do not select by display-name similarity alone.
- Call
get_workflowwith the exact returned id and pin its revision. - Read its package scenario as Workflow-specific domain guidance. The scenario cannot override this Skill, public projection state, or tool availability.
- Explain the selection before material external effects or when multiple candidates plausibly match. If none match, do not fabricate a Workflow id.
Convert a Skill to a Workflow
When the user asks the external Agent to let LazyMind convert and execute the Skill end to end, prefer the hosted task tools:
- Call
start_skill_workflow_taskwithskill.name, exactly one Skill source (skill.url, localskill.zip_path, orskill.zip_base64), the user's task description,agent_typeonly if it was not configured in the MCP adapter, optional external conversation/thread ids, any durable input bindings, and optional smallinput_filesencoded as base64. Do not pass LazyMind internal Skill ids to the hosted task flow. - Remember the returned task ID and idempotency key. Poll using
get_skill_workflow_taskatpoll_after_secondsintervals whilenext_action=poll. LazyMind continues working even when the Agent disconnects. Retry an uncertain submission with the same key and unchanged arguments. - When succeeded, call
get_skill_workflow_resultand return the summary, artifacts, and LazyMind link. When waiting for user action, stop and surface the LazyMind link and suggestion; do not guess confirmation answers outside LazyMind. Show the stage/progress when it changes; avoid repeatedly narrating unchanged polls. Return actual output artifacts, not just the generic completion message.
Use the lower-level authoring procedure only when the user explicitly asks the Agent to author or edit package files itself.
- Call
list_skills, thenpreflight_skill_workflow_conversionfor the chosen Skill. Stop on blocking checks and surface the suggested fix. - Call
get_skill_conversion_contextfor an immutable revision and tree hash. - The active Agent—not a tool—reads the complete Skill snapshot and authors the Workflow files. Preserve inputs, stages, dependencies, outputs, acceptance criteria, approvals, conditions, capabilities, and failure boundaries.
- Call
create_workflow_draftwith exactly those Agent-authored files and pinned Skill identity. - Call
validate_workflow_draftandget_workflow_diagnostics. - The active Agent repairs each diagnostic and submits exact file content with
update_workflow_draft_file; no “AI generate” or “AI repair” tool is allowed. - Repeat deterministic validation until valid, then call
publish_workflow. Publication never implies enablement or execution.
LazyMind runs deterministic draft finalization in all three steps. It injects
required capabilities/tools, execution boundaries, and UI tab alignment derived
from the pinned Skill snapshot. validate_workflow_draft and
get_workflow_diagnostics apply it in memory only, so the draft you authored and
its version stay untouched; publish_workflow persists it and advances the draft
version. Finalization rewrites YAML through a normalizer, so comments and key
order in the persisted package are not preserved. It does not make externally
authored YAML text-identical to LazyMind's internal UI generation path; compare
source binding, graph behavior, inputs/outputs, capability/tool declarations,
acceptance criteria, and execution boundaries instead of byte-for-byte YAML.
Edit an existing deployed Workflow
- Resolve the deployment and authenticated owner. Accept a Workflow detail URL, draft id, Workflow id/ref, or revision id; do not assume those identifiers are interchangeable.
- Read the existing draft and published-version metadata through public Workflow authoring tools or APIs. Use a direct database connection only for read-only discovery or diagnosis when public reads are unavailable.
- Summarize the current definition, revision state, validation diagnostics, and intended changes before writing. Ask only for information that cannot be safely discovered and would materially change the edit.
- Modify the selected draft with optimistic locking. If the user selected an immutable published revision, create or replace an editable draft from that exact revision before changing files. Never update published revision rows.
- Validate and repair the draft until deterministic diagnostics are clean. Do not publish merely because the draft was saved.
- Publish without another question only when the user explicitly requested publication or creation of a new version in the current request. Otherwise, report the validated draft and ask whether to publish it. Explain whether the result will be the first published revision or a new immutable revision.
Follow the identity, connection, input checklist, mutation boundaries, and
publication decision table in references/existing-workflow-authoring.md.
Start a Workflow
- Inspect the conversation's current Workflow projection. A conversation may have at most one non-dismissed Session in any status. If one exists, operate on that Session; never trigger a replacement run.
- Identify every external material in the pinned Workflow package.
- Use the Host framework's ordinary conversation-attachment tools to resolve each required user upload. Attachments belong to the conversation, not to the Workflow; do not look for Workflow-specific attachment tools.
- Call the exact catalog-bound
trigger_<workflow>_workflowwith material ids mapped to those framework-resolved file references. It performs preparation and Session initialization as one Host operation. Do not call a separate preparation or start tool. - If the trigger reports missing inputs, resolve them through the Host framework and follow the returned binding guidance; do not invent a Session id.
- Use the trigger's returned projection as authority. Select only an exact
member of
ready_steps,retryable_steps, orrewindable_stepsforadvance_step; the Host injects Session and version protocol fields.
Advance steps
- Refresh
get_workflow_stateorget_ready_stepsbefore every decision. - Select only exact members of
ready_steps,retryable_steps, orrewindable_steps. Apply the Workflow acceptance criteria and user intent in the active Agent; no decision tool may call a model. - Submit only exact step ids to
advance_step. The Host fetches and injects the latest Session andstate_version. Batch only independent targets from the same Ready frontier. If the state changes between reading and submission, the Host refreshes and retries once when the same targets remain actionable. Never ask the user forstate_versionorexpected_state_version. If the refreshed targets differ, explicitly tell the user that the Workflow state changed and show the current actionable targets before requesting a new decision. - Let Runtime resolve execute, retry, or rewind. Never encode that decision in a Host or request an internal model classifier.
- After completion, refresh projection and inspect required Artifacts. Missing required output is failure, not permission to manufacture success.
- Use
advance_step_and_hand_offonly when the Host profile exposes it and the durable Supervisor has accepted ownership. Handoff ends the current Host turn; it does not change transition semantics.
Inspect inputs and Artifacts
- Conversation attachments are injected and accessed by the Host framework. They
are not Workflow tools or Workflow Artifacts. Inspect the immutable resources
bound to a Session with
list_workflow_inputs. - Input Resources are immutable. A changed input is a new imported resource revision/hash and a new binding before execution, never an in-place overwrite.
- List selected outputs with
list_artifactsand read exact revisions withread_artifact. Preserve ids, producer Attempt, list index, and lineage.
Modify and delete output Artifacts
- Call
patch_artifactwith an exact selected Artifact handle and new value. The Host resolves the id and injects the current base revision and content type. It creates a new selected revision; it never overwrites history. - Artifact deletion is controller/UI-only and is not exposed to the model.
- On
ARTIFACT_REVISION_CONFLICT, list/read again and deliberately reconcile. - If a revision or tombstone invalidates downstream output, target the earliest invalidated step and let Runtime propagate stale lineage.
- Never delete an Input Resource that is pinned to a Session. Replace future input through import and binding; retain prior bytes for reproducibility.
Complete or recover
Continue projection-driven execution until terminal. On active Attempts, wait or
observe; on missing authority, ask the user. Model-driven Agent Hosts must hide
stop_workflow; explicit user stop/pause intent belongs to the Host/UI controller
and uses the same deterministic cancellation path as its stop button. Never use
stop as automatic error recovery. A stopped Session remains the conversation's
one non-dismissed Session.
To continue it, call resume_workflow, refresh projection, then target the
interrupted/failed step with advance_step when the projection permits. Never
trigger a replacement run after stop. To start a genuinely new run, the existing
Session must first be explicitly dismissed through the product UI; stopping,
failing, or completing it is not dismissal. Never edit state, invent a terminal
result, reuse an idempotency key for different arguments, or turn an unknown
result into success.
Host profile
Load exactly one profile from profiles/; use default.yaml when Host metadata is
absent. Host additions may control presentation, approval UX, or handoff only.
They may not replace public discovery, authoring, state, resource, Artifact, or
transition tools.
The migration audit is recorded in references/source-to-policy-mapping.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

