[{"data":1,"prerenderedAt":528},["ShallowReactive",2],{"docs-navigation":3,"docs-\u002Fdocs\u002Fusage\u002Fworkflows":90,"docs-surround-\u002Fdocs\u002Fusage\u002Fworkflows":523},[4],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Docs","\u002Fdocs","docs",[9,35,56,77],{"title":10,"path":11,"stem":12,"children":13,"page":34},"Get Started","\u002Fdocs\u002Fget-started","docs\u002F1.get-started",[14,18,22,26,30],{"title":15,"path":16,"stem":17},"Introduction","\u002Fdocs\u002Fget-started\u002Fintroduction","docs\u002F1.get-started\u002F1.introduction",{"title":19,"path":20,"stem":21},"Concepts","\u002Fdocs\u002Fget-started\u002Fconcepts","docs\u002F1.get-started\u002F2.concepts",{"title":23,"path":24,"stem":25},"Installation","\u002Fdocs\u002Fget-started\u002Finstallation","docs\u002F1.get-started\u002F3.installation",{"title":27,"path":28,"stem":29},"Setup","\u002Fdocs\u002Fget-started\u002Fsetup","docs\u002F1.get-started\u002F4.setup",{"title":31,"path":32,"stem":33},"Maintenance","\u002Fdocs\u002Fget-started\u002Fmaintenance","docs\u002F1.get-started\u002F5.maintenance",false,{"title":36,"path":37,"stem":38,"children":39,"page":34},"Usage","\u002Fdocs\u002Fusage","docs\u002F2.usage",[40,44,48,52],{"title":41,"path":42,"stem":43},"Projects","\u002Fdocs\u002Fusage\u002Fprojects","docs\u002F2.usage\u002F1.projects",{"title":45,"path":46,"stem":47},"Workflows","\u002Fdocs\u002Fusage\u002Fworkflows","docs\u002F2.usage\u002F2.workflows",{"title":49,"path":50,"stem":51},"Triggers","\u002Fdocs\u002Fusage\u002Ftriggers","docs\u002F2.usage\u002F3.triggers",{"title":53,"path":54,"stem":55},"AI Agent","\u002Fdocs\u002Fusage\u002Fagent","docs\u002F2.usage\u002F4.agent",{"title":57,"path":58,"stem":59,"children":60,"page":34},"Integrations","\u002Fdocs\u002Fintegrations","docs\u002F3.integrations",[61,65,69,73],{"title":62,"path":63,"stem":64},"GitHub","\u002Fdocs\u002Fintegrations\u002Fgithub","docs\u002F3.integrations\u002F1.github",{"title":66,"path":67,"stem":68},"Jira","\u002Fdocs\u002Fintegrations\u002Fjira","docs\u002F3.integrations\u002F2.jira",{"title":70,"path":71,"stem":72},"Plane","\u002Fdocs\u002Fintegrations\u002Fplane","docs\u002F3.integrations\u002F3.plane",{"title":74,"path":75,"stem":76},"Linear","\u002Fdocs\u002Fintegrations\u002Flinear","docs\u002F3.integrations\u002F4.linear",{"title":78,"path":79,"stem":80,"children":81,"page":34},"Resources","\u002Fdocs\u002Fresources","docs\u002F4.resources",[82,86],{"title":83,"path":84,"stem":85},"Beta Testers","\u002Fdocs\u002Fresources\u002Fbeta-testers","docs\u002F4.resources\u002F1.beta-testers",{"title":87,"path":88,"stem":89},"Troubleshooting","\u002Fdocs\u002Fresources\u002Ftroubleshooting","docs\u002F4.resources\u002F2.troubleshooting",{"id":91,"title":45,"body":92,"description":517,"extension":518,"meta":519,"navigation":520,"path":46,"seo":521,"stem":47,"__hash__":522},"docs_en\u002Fdocs\u002F2.usage\u002F2.workflows.md",{"type":93,"value":94,"toc":508},"minimark",[95,99,104,107,114,119,127,262,265,268,275,279,286,289,293,296,319,322,326,329,504],[96,97,98],"p",{},"A workflow is a list of steps Knecht runs on a project, one after the other, inside the project's own environment. Each step executes one action. A workflow is built once and can then be started by hand or by a trigger on any number of projects.",[100,101,103],"h2",{"id":102},"building-a-workflow","Building a Workflow",[96,105,106],{},"The workflow editor shows the steps as a numbered rail. Steps are added from the library, reordered by drag and drop, and configured in place. Every edit is saved automatically. Steps run in order, there are no parallel branches.",[96,108,109],{},[110,111],"img",{"alt":112,"src":113},"The workflow editor for a Summarize PR workflow, with Run in the header, a GitHub pull request trigger with its events, conditions, and projects, a Boot project and an AI step, and the step library on the right","\u002Fassets\u002Fknecht-workflow-ki-summarize.png",[115,116,118],"h3",{"id":117},"run-variables","Run Variables",[96,120,121,122,126],{},"Steps reference earlier results and trigger data with double curly braces. Typing ",[123,124,125],"code",{},"{{"," in any field opens an autocomplete with what is available at that point. The namespaces:",[128,129,130,143],"table",{},[131,132,133],"thead",{},[134,135,136,140],"tr",{},[137,138,139],"th",{},"Run variable",[137,141,142],{},"Holds",[144,145,146,161,202,216,235,249],"tbody",{},[134,147,148,154],{},[149,150,151],"td",{},[123,152,153],{},"{{ steps.\u003Cid>.\u003Coutput> }}",[149,155,156,157,160],{},"An output of an earlier step, for example ",[123,158,159],{},"{{ steps.update.stdout }}",". The id is derived from the step's label and editable.",[134,162,163,168],{},[149,164,165],{},[123,166,167],{},"{{ inputs.\u003Cfield> }}",[149,169,170,171,174,175,174,178,174,181,184,185,174,188,174,191,174,194,197,198,201],{},"What the trigger delivered: ",[123,172,173],{},"title",", ",[123,176,177],{},"body",[123,179,180],{},"url",[123,182,183],{},"identifier"," (the issue or pull request number, or the ticket key), plus ",[123,186,187],{},"event",[123,189,190],{},"status",[123,192,193],{},"labels",[123,195,196],{},"assignee",", and ",[123,199,200],{},"author",".",[134,203,204,213],{},[149,205,206,209,210],{},[123,207,208],{},"{{ run.id }}"," and ",[123,211,212],{},"{{ run.url }}",[149,214,215],{},"The run's number and its page in the dashboard.",[134,217,218,223],{},[149,219,220],{},[123,221,222],{},"{{ project.name }}",[149,224,225,226,174,229,197,232,201],{},"The project's name, also ",[123,227,228],{},"owner",[123,230,231],{},"fullName",[123,233,234],{},"defaultBranch",[134,236,237,242],{},[149,238,239],{},[123,240,241],{},"{{ preview.url }}",[149,243,244,245,248],{},"The preview URL after the boot step. The boot step also delivers it as its output ",[123,246,247],{},"{{ steps.\u003Cid>.url }}",", which is the form the autocomplete offers.",[134,250,251,259],{},[149,252,253,174,256],{},[123,254,255],{},"{{ loop.item }}",[123,257,258],{},"{{ loop.index }}",[149,260,261],{},"Inside a Loop step, the current item and its index, starting at 0.",[96,263,264],{},"A missing value renders as an empty string, so a run variable for something a step has not produced yet does not break the run.",[100,266,49],{"id":267},"triggers",[96,269,270,271,274],{},"Triggers sit at the head of the workflow in the editor and define when it starts on its own. Knecht offers GitHub events, issue trackers, and cron schedules. Starting a workflow by hand needs no trigger. \"Pause triggers\" in the menu of the editor header turns all triggers of a workflow off, and a paused workflow says so above its triggers. Each trigger, its options, and the inputs it delivers are described on ",[272,273,49],"a",{"href":50},". The steps and agent commands that write back are described on the page of each integration.",[100,276,278],{"id":277},"testing-before-you-activate","Testing before You Activate",[96,280,281,282,285],{},"\"Run\" in the editor header starts the workflow on a project and branch of your choice, with the current draft. The test runs under the same rules as a real run, in the project's environment, with the log streaming into the editor. A collapsed section in the run popover lets you type a mock trigger event, so run variables such as ",[123,283,284],{},"{{ inputs.title }}"," can be tried without a real issue. The editor remembers the last mock inputs per workflow in your browser.",[96,287,288],{},"A draft that is not complete cannot run. The header lists what is missing, and clicking an entry opens the affected step.",[100,290,292],{"id":291},"reporting-back","Reporting Back",[96,294,295],{},"When a run in the session of an issue tracker issue finishes, Knecht comments on that issue without any step in the workflow:",[297,298,299,307,313],"ul",{},[300,301,302,306],"li",{},[303,304,305],"strong",{},"A pull request was opened."," \"Knecht opened a pull request for this issue\" with the link. The tool's own word stands in for \"issue\", for example \"ticket\" in Jira.",[300,308,309,312],{},[303,310,311],{},"The run failed."," \"Knecht could not finish the run for this issue\" with the link to the run in the dashboard.",[300,314,315,318],{},[303,316,317],{},"Succeeded without a pull request."," Nothing. Whatever the agent replied stands on its own.",[96,320,321],{},"Runs on a GitHub issue or pull request get no such comment.",[100,323,325],{"id":324},"workflows-as-code","Workflows as Code",[96,327,328],{},"The overflow menu in the editor exports a workflow as YAML or JSON. \"Import\" on the workflows page creates a workflow from such a file. The export format is a plain step list, so a workflow can live in a git repository, be reviewed like code, and be moved between instances. Hand-written files are accepted as well and can use the short form:",[330,331,333],"docs-workflow-yaml",{"filename":332},"demo-pr.yaml",[334,335,340],"pre",{"className":336,"code":337,"language":338,"meta":339,"style":339},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","version: 1\nname: demo-pr\ndescription: Make a small change and open a PR.\nsteps:\n  - create-branch:\n      name: knecht\u002Fdemo-{{ run.id }}\n  - bash:\n      command: date > .knecht-demo.txt\n  - create-commit:\n      message: \"Knecht demo change (run {{ run.id }})\"\n  - create-pr:\n      title: \"Knecht demo (run {{ run.id }})\"\n      description: |\n        Automated demo change by Knecht, run {{ run.id }} on {{ project.name }}.\n","yaml","",[123,341,342,359,371,382,391,402,413,423,434,444,461,471,486,498],{"__ignoreMap":339},[343,344,347,351,355],"span",{"class":345,"line":346},"line",1,[343,348,350],{"class":349},"swJcz","version",[343,352,354],{"class":353},"sMK4o",":",[343,356,358],{"class":357},"sbssI"," 1\n",[343,360,362,365,367],{"class":345,"line":361},2,[343,363,364],{"class":349},"name",[343,366,354],{"class":353},[343,368,370],{"class":369},"sfazB"," demo-pr\n",[343,372,374,377,379],{"class":345,"line":373},3,[343,375,376],{"class":349},"description",[343,378,354],{"class":353},[343,380,381],{"class":369}," Make a small change and open a PR.\n",[343,383,385,388],{"class":345,"line":384},4,[343,386,387],{"class":349},"steps",[343,389,390],{"class":353},":\n",[343,392,394,397,400],{"class":345,"line":393},5,[343,395,396],{"class":353},"  -",[343,398,399],{"class":349}," create-branch",[343,401,390],{"class":353},[343,403,405,408,410],{"class":345,"line":404},6,[343,406,407],{"class":349},"      name",[343,409,354],{"class":353},[343,411,412],{"class":369}," knecht\u002Fdemo-{{ run.id }}\n",[343,414,416,418,421],{"class":345,"line":415},7,[343,417,396],{"class":353},[343,419,420],{"class":349}," bash",[343,422,390],{"class":353},[343,424,426,429,431],{"class":345,"line":425},8,[343,427,428],{"class":349},"      command",[343,430,354],{"class":353},[343,432,433],{"class":369}," date > .knecht-demo.txt\n",[343,435,437,439,442],{"class":345,"line":436},9,[343,438,396],{"class":353},[343,440,441],{"class":349}," create-commit",[343,443,390],{"class":353},[343,445,447,450,452,455,458],{"class":345,"line":446},10,[343,448,449],{"class":349},"      message",[343,451,354],{"class":353},[343,453,454],{"class":353}," \"",[343,456,457],{"class":369},"Knecht demo change (run {{ run.id }})",[343,459,460],{"class":353},"\"\n",[343,462,464,466,469],{"class":345,"line":463},11,[343,465,396],{"class":353},[343,467,468],{"class":349}," create-pr",[343,470,390],{"class":353},[343,472,474,477,479,481,484],{"class":345,"line":473},12,[343,475,476],{"class":349},"      title",[343,478,354],{"class":353},[343,480,454],{"class":353},[343,482,483],{"class":369},"Knecht demo (run {{ run.id }})",[343,485,460],{"class":353},[343,487,489,492,494],{"class":345,"line":488},13,[343,490,491],{"class":349},"      description",[343,493,354],{"class":353},[343,495,497],{"class":496},"s7zQu"," |\n",[343,499,501],{"class":345,"line":500},14,[343,502,503],{"class":369},"        Automated demo change by Knecht, run {{ run.id }} on {{ project.name }}.\n",[505,506,507],"style",{},"html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":339,"searchDepth":361,"depth":361,"links":509},[510,513,514,515,516],{"id":102,"depth":361,"text":103,"children":511},[512],{"id":117,"depth":373,"text":118},{"id":267,"depth":361,"text":49},{"id":277,"depth":361,"text":278},{"id":291,"depth":361,"text":292},{"id":324,"depth":361,"text":325},"Build, trigger, and test workflows for your projects.","md",{},true,{"title":45,"description":517},"Uw6m0Kg7rRyzVasX7Xfu6cv6VsUgoh21DBXzPNYdG1w",[524,526],{"title":41,"path":42,"stem":43,"description":525,"children":-1},"Add a project, run it through Knecht, and manage it afterward.",{"title":49,"path":50,"stem":51,"description":527,"children":-1},"Start workflows from GitHub events, from an issue tracker, or on a schedule.",1790265016078]