Add Patchwork Recipe schema (patchwork-recipe.json)#5608
Open
kungfuk3nnyyy wants to merge 3 commits intoSchemaStore:masterfrom
Open
Add Patchwork Recipe schema (patchwork-recipe.json)#5608kungfuk3nnyyy wants to merge 3 commits intoSchemaStore:masterfrom
kungfuk3nnyyy wants to merge 3 commits intoSchemaStore:masterfrom
Conversation
Adds JSON Schema for Patchwork recipe YAML files (.patchwork.yaml). Schema covers recipe fields, step definitions, trigger types, template expressions, and chained-step metadata. Schema URL: https://raw.githubusercontent.com/patchworkos/recipes/main/schema/recipe.v1.json fileMatch: ['*.patchwork.yaml', '*.patchwork.yml']
Contributor
|
Thanks for the PR! This section of the codebase is owned by @madskristensen and |
for more information, see https://pre-commit.ci
| @@ -0,0 +1,355 @@ | |||
| { | |||
Contributor
There was a problem hiding this comment.
if you're adding an external URL to the catalog.json file, you don't need to upload the schema to this repo
Per maintainer feedback (madskristensen, PR SchemaStore#5608): when the catalog entry references an external URL, the schema does not need to be mirrored into this repo. Removing the file also resolves the `validate` CI failure caused by `positive/`+`negative/` test subdirectories not matching SchemaStore's flat-file convention.
Author
|
Thanks @madskristensen — good point. Just dropped Let me know if you'd like any other changes. |
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.
What is Patchwork?
Patchwork is a recipe-based automation platform for developer workflows. Recipes are YAML files that chain tool calls across SaaS connectors (Jira, GitHub, Slack, Gmail, Linear, etc.) with support for parallel execution, conditional steps, template variables, and approval-gated writes.
What this PR adds
A JSON Schema for Patchwork recipe files (
.patchwork.yaml/.patchwork.yml). The schema covers:name,description,trigger,steps,maxConcurrency,maxDepth,apiVersionid,tool,params,awaits,when,optional,risk,outputagentfield withmodel,prompt,toolsrecipefield for chainingmanual,cron,webhook,chained{{steps.X.data.field}},{{env.VAR}}Schema location
File match patterns
(Intentionally narrow — does not claim
*.yamlglobally. Authors using plain.yamlfilenames should add the# yaml-language-server: $schema=...header.)Editor experience
Any editor with
yaml-language-server(VS Code YAML extension, IntelliJ, Neovim with yaml-ls) will provide autocomplete, hover docs, and validation for all recipe fields.Recipes generated by
patchwork recipe newalready emit the$schemaheader automatically.Checklist
src/schemas/json/patchwork-recipe.jsonaddedsrc/api/json/catalog.jsonentry added