Repository navigation
feat(skills): add the workflow-creator skill - #7873
Merged
Merged
Conversation
Skills are registry content: they ship from librefang/librefang-registry under `skills/<name>/` and are installed on demand, which is why this repo has no bundled-skills directory for one to land in.
The skill itself therefore goes to the registry; what lands here is the copy pinned in the registry snapshot plus the tests that keep it honest, because `workflow-creator` is the one registry skill whose subject matter is this codebase.
The body is written against the code rather than the issue's sketch of it: all four `StepAgent` shapes including `{"type": …}` find-or-spawn, `required_skills` with the three failure classes its error text distinguishes, the ceilings `build_created_workflow` enforces, and the creation-time validations an author is most likely to trip — duplicate step names, a dependency on a step that does not exist, an operator node wired into a DAG, a `prompt_template` on a node that ignores it.
Two step fields the tool already accepted are now advertised.
`WorkflowCreateSpec` deserialises the canonical `WorkflowStep`, so `workflow_create` has always taken `required_skills`, `session_mode` and `inherit_context`, and agent-type routing — none of which its published schema mentioned.
A field accepted but unadvertised is a field no model sends, and a skill documenting keys the tool's own schema denies would have shipped a contradiction.
`the_tool_schema_advertises_the_step_routing_fields_the_spec_accepts` asserts acceptance and advertisement together so they cannot drift apart in either direction.
`tests/workflow_creator_skill.rs` loads the pinned copy through `SkillRegistry::load_all` — the same path an operator's install takes, injection scan included — and checks the ceilings quoted in its prose against the live tool schema rather than hardcoded numbers, so moving a limit fails CI instead of quietly making the skill wrong.
It also pins the SKILL.md-only layout: adding a `skill.toml` beside it without a `prompt_context.md` suppresses the auto-convert and drops the entire prompt body with no error anywhere.
CONTRIBUTING pointed skill authors at `skills/community/`, a path deleted in #1212 and read by nothing since.
Closes #6934
The fragment carried only the issue number, so the release assembler would have emitted a generated line for the PR alongside the curated bullet.
Deploying librefang-docs with
|
| Latest commit: |
7ef93e6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5916909b.librefang-docs.pages.dev |
| Branch Preview URL: | https://feat-6934-workflow-creator-s.librefang-docs.pages.dev |
houko
enabled auto-merge (squash)
August 24, 2026 18:51
This was referenced Aug 24, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6934
The remaining scope item of #6934 — "PR 2:
workflow-creatorskill". PR 1 merged as #7857; the issue's other two items are listed under Future and are untouched here.Premise correction: this repo has no bundled-skills directory
Skills are registry content. They ship from librefang/librefang-registry under
skills/<name>/, are synced into~/.librefang/registry/, and are installed on demand —registry_sync::fanout_registry_contentsays so in as many words ("Skills and plugins stay in registry — users install via dashboard"), and fans out providers, channels, MCP, agent templates and workflow templates but not skills.The repo-root
skills/directory that the unmerged #6943 puts its copy of this skill in was deleted in #1212 and is read by nothing onmain; askills/workflow-creator/skill.tomlthere would never load.CONTRIBUTING.mdstill pointed authors at that deadskills/community/path, which is fixed here.So the skill itself goes to the registry: librefang/librefang-registry#105. What lands in this PR is the copy pinned in the registry snapshot plus the tests that keep it honest —
workflow-creatoris the one registry skill whose subject matter is this codebase, and its prose encodes limits this repo can move.Changes
crates/librefang-runtime/tests/fixtures/registry/skills/workflow-creator/SKILL.md— the pinned copy of the shipped skill, and the fixture README's note on why this one entry is present when the other sixty are not.crates/librefang-runtime/tests/workflow_creator_skill.rs— four tests, below.crates/librefang-runtime/src/tool_runner/definitions.rs—workflow_create's step schema now advertisesrequired_skills,session_modeandinherit_context, and itsagentdescription covers all fourStepAgentshapes rather than only bare-string and{"id": …}.crates/librefang-kernel/src/kernel/handles/workflow_runner.rs—the_tool_schema_advertises_the_step_routing_fields_the_spec_accepts, a drift guard for the above.STEP_AGENT_ROUTING_KEYSbecomespub(crate)so the test reads the routing keys from their definition rather than restating them.docs/src/app/agent/skills/page.mdxand itszhtwin — 60 → 61 bundled skills, newAutomationrow.CONTRIBUTING.md, changelog fragment.Why the schema change is in scope
WorkflowCreateSpecdeserialises the canonicalWorkflowStep, soworkflow_createhas always acceptedrequired_skills(#7721), the per-stepsession_mode,inherit_context, and{"type": …}agent routing — none of which its published schema mentioned. A field accepted but unadvertised is a field no model sends, and shipping a skill that documents keys the tool's own schema denies would have been a contradiction inside one deliverable. The new test asserts acceptance and advertisement together, so the two cannot drift apart in either direction.Skill content
Written against the implementation, not the issue's sketch of it: the four agent-binding shapes and when each is right,
required_skillswith the three failure classesRequiredSkillReportdistinguishes, the ceilingsbuild_created_workflowenforces,param_typerather thantypeon input parameters, and six failure modes with the reason each is rejected — duplicate step names, a dependency on a step that does not exist, an operator node wired into a DAG, aprompt_templateon a node that ignores the field,{{input}}across a fan-out, and treating a registered workflow as private when workflows have no ownership model.Verification
cargo test -p librefang-runtime --test workflow_creator_skill— 4/4.workflow_creator_ships_as_a_skill_md_with_no_competing_manifestpins the SKILL.md-only layout:load_allauto-converts aSKILL.mdonly when noskill.tomlsits beside it, so adding one without also writingprompt_context.mddrops the entire prompt body of a prompt-only skill with no error anywhere.workflow_creator_loads_and_registers_as_a_prompt_only_skillloads it throughSkillRegistry::load_all— the same path an operator's install takes, load-boundary prompt-injection scan included.workflow_creator_prompt_surface_is_deterministic_across_insertion_ordersrenders the skill block from two registries holding identical content in opposite insertion orders and asserts byte equality (Enforce deterministic ordering for LLM-bound registries to stabilize prompt cache #3298).workflow_creator_prose_matches_the_live_workflow_create_schemareads the step / per-step-timeout / total-timeout ceilings out ofbuiltin_tool_definitions()instead of hardcoding them, so moving a limit fails CI rather than quietly making the skill wrong, and cross-checks every step key the skill teaches against the schema.cargo test -p librefang-kernel --lib workflow_runner::tests— 13/13, including the new drift guard.cargo test -p librefang-api --test skills_routes_test— 38/38 (the snapshot now seeds oneregistry/skills/entry where it seeded none).cargo test -p librefang-skills --lib registry::tests— 25/25,all_tool_definitions_is_deterministic_across_insertion_ordersincluded.cargo test -p librefang-runtime --lib tool_runner(442),--test tool_runner_workflow_write(18),--test tool_runner_workflow_readonly(11).cargo clippy -p librefang-runtime --testsand-p librefang-kernel --lib --tests, both-D warnings, clean.Notes for review
workflow_create, whose tool half feat(workflows): add workflow_create with an atomic name reservation #7857 superseded. Not closing or relabelling it; flagging the overlap so its author can drop the skill commit or close it deliberately.