[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6J9VH3CCEBQMDMZBQNVWF9F":3,"skill-same:01M6J9VH3CCEBQMDMZBQNVWF9F":131},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":65,"commitSha":66,"skillDirectory":67,"forksCount":68,"repositoryHtmlUrl":69,"repositoryHomepageUrl":70,"ownerHtmlUrl":71,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":72,"install":73,"resources":86},"01M6J9VH3CCEBQMDMZBQNVWF9F","workflow-authoring",null,"Generate, validate, preview, and run portable Harn workflow bundle JSON for\nmonitoring and repairing pull requests, deploys, logs, and other event-driven\nengineering work. Optimized for smaller models (qwen, gemma, llama.cpp) with\nexplicit XML sections, strict JSON output, and a validation-and-retry loop.","burin-labs\u002Fharn","burin-labs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F270508823?v=4","01M6J9MTN4TKZ12YF6BAX0DARN","Burin Labs","01M6J9MTSTW6RRQ2TWKYV1A3X1",31,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"workflow","workflow authoring","authoring","failing","cli","when","retry","host","preview","query","patch","work","schedule","wait for","loop","Bash","monitoring","logs","run","generate","cpp","pull requests","2026-11-10 10:12:30",false,"---\nname: workflow-authoring\nshort: Author Harn portable workflow bundles for day-to-day engineering automations.\ndescription: |\n  Generate, validate, preview, and run portable Harn workflow bundle JSON for\n  monitoring and repairing pull requests, deploys, logs, and other event-driven\n  engineering work. Optimized for smaller models (qwen, gemma, llama.cpp) with\n  explicit XML sections, strict JSON output, and a validation-and-retry loop.\nwhen-to-use: |\n  Use when the user asks for a durable engineering automation expressed as a\n  Harn workflow bundle: monitor this PR, wait for deploy then query logs,\n  repair failing checks, schedule a recurring health probe, or import a\n  workflow into Burin \u002F a host. Pair with the workflow CLI: `harn workflow\n  validate|preview|run --bundle \u003Cpath> --json`.\nallowed_tools:\n  - \"Bash(harn workflow validate:*)\"\n  - \"Bash(harn workflow preview:*)\"\n  - \"Bash(harn workflow run:*)\"\n  - \"Bash(harn workflow patch:*)\"\n  - \"Bash(harn workflow function-tools:*)\"\n  - \"Bash(harn workflow nested-ceiling:*)\"\n  - \"Bash(harn check:*)\"\n  - \"Read\"\n  - \"Write\"\n  - \"Edit\"\n---\n\n# Workflow authoring (Harn workflow bundles)\n\nYou are authoring a **portable workflow bundle** — a JSON file Harn validates,\npreviews, and runs locally. Hosts (IDE TUI\u002FGUI, cloud-platform importers) consume\nthe same bundle without rewriting.\n\nRead **`prompting.md`** in this directory before composing a response. It\ndefines the response sections, JSON envelope, and small-model rules. Every\nrecipe under `recipes\u002F` is a worked, validated example you can crib from.\n\n## What good output looks like\n\n1. A single `\u003Cbundle>` block containing valid JSON for a `WorkflowBundle`.\n2. A short `\u003Crationale>` block (≤ 5 bullets) explaining the trigger, the\n   waitpoints, and the connector requirements.\n3. A `\u003Cverify>` block listing the exact commands the user should run:\n\n   ```bash\n   harn workflow validate --bundle out.bundle.json --json\n   harn workflow preview  --bundle out.bundle.json --json\n   harn workflow run      --bundle out.bundle.json --json\n   ```\n\nIf validation fails, **read the diagnostic, edit the bundle, and re-validate**.\nDo not invent fields or kinds — the validator's enum lists are the source of\ntruth.\n\n## Bundle skeleton\n\n```json\n{\n  \"schema_version\": 2,\n  \"entrypoint\": \"workflows\u002F\u003Ckebab-case-id>.harn\",\n  \"transitive_modules\": [\n    {\n      \"path\": \"workflows\u002F\u003Ckebab-case-id>.harn\",\n      \"source_hash_blake3\": \"blake3:\u003C64 lowercase hex digits>\",\n      \"harnbc_hash_blake3\": \"blake3:\u003C64 lowercase hex digits>\"\n    }\n  ],\n  \"stdlib_version\": \"\u003Charn stdlib version>\",\n  \"harn_version\": \"\u003Charn version>\",\n  \"provider_catalog_hash\": \"blake3:\u003C64 lowercase hex digits>\",\n  \"tool_manifest\": [],\n  \"sbom\": {\n    \"format\": \"spdx-lite\",\n    \"version\": \"2.3\",\n    \"packages\": [],\n    \"relationships\": []\n  },\n  \"signature\": null,\n  \"parent_trust_record_id\": null,\n  \"id\": \"\u003Ckebab-case-id>\",\n  \"name\": \"\u003Chuman label>\",\n  \"version\": \"1.0.0\",\n  \"triggers\": [\n    { \"id\": \"\u003Ctrigger-id>\", \"kind\": \"github|cron|delay|webhook|mcp|manual\",\n      \"provider\": \"github\", \"events\": [\"pull_request.opened\"],\n      \"node_id\": \"\u003Centry-node-id>\" }\n  ],\n  \"workflow\": {\n    \"_type\": \"workflow_graph\",\n    \"id\": \"\u003Cgraph-id>\",\n    \"version\": 1,\n    \"entry\": \"\u003Centry-node-id>\",\n    \"nodes\": {\n      \"\u003Cnode-id>\": { \"id\": \"\u003Cnode-id>\", \"kind\": \"action|waitpoint|notification\",\n                     \"task_label\": \"\u003Cshort label>\" }\n    },\n    \"edges\": [ { \"from\": \"\u003Cfrom-node-id>\", \"to\": \"\u003Cto-node-id>\" } ]\n  },\n  \"prompt_capsules\": {\n    \"\u003Ccapsule-id>\": { \"id\": \"\u003Ccapsule-id>\", \"node_id\": \"\u003Cnode-id>\",\n                      \"trigger_id\": \"\u003Ctrigger-id>\",\n                      \"prompt\": \"\u003Cself-contained continuation prompt>\" }\n  },\n  \"policy\": {\n    \"autonomy_tier\": \"shadow|suggest|act_with_approval|act_auto\",\n    \"retry\":   { \"max_attempts\": 2, \"backoff\": \"exponential\" },\n    \"catchup\": { \"mode\": \"none|latest|all\", \"max_events\": 1 }\n  },\n  \"connectors\": [\n    { \"id\": \"github\", \"provider_id\": \"github\",\n      \"scopes\": [\"pull_requests:read\", \"checks:read\"],\n      \"setup_required\": true, \"status_required\": true }\n  ],\n  \"environment\": {\n    \"repo_setup_profile\": \"default\",\n    \"worktree_policy\": \"reuse_current|new_worktree|host_managed\",\n    \"command_gates\": [\"make test\"]\n  }\n}\n```\n\n## Hard rules (validator enforces)\n\n- `schema_version` must be `2`.\n- `entrypoint`, `transitive_modules`, `stdlib_version`, `harn_version`,\n  `provider_catalog_hash`, `tool_manifest`, `sbom`, `signature`, and\n  `parent_trust_record_id` are part of the canonical `.harnpack` manifest.\n- BLAKE3 fields use `blake3:\u003C64 lowercase hex digits>`.\n- `id`, `version`, `workflow.id`, `workflow.entry` are non-empty.\n- Every `workflow.nodes[k].id` matches its map key `k`.\n- Every edge endpoint and `trigger.node_id` references an existing node.\n- `policy.autonomy_tier` ∈ `{shadow, suggest, act_with_approval, act_auto}`.\n- `policy.catchup.mode` ∈ `{none, latest, all}`.\n- `policy.retry.max_attempts >= 1`.\n- `environment.worktree_policy` ∈ `{reuse_current, new_worktree, host_managed}`.\n- Trigger kind requirements:\n  - `github` → `provider: \"github\"` and at least one `events[]`.\n  - `cron` → `schedule`.\n  - `delay` → `delay` (ISO-8601 duration, e.g. `PT10M`).\n  - `webhook` → `webhook_path`.\n  - `mcp` → `mcp_tool`.\n  - `manual` → no extra fields.\n- Every `prompt_capsules[k].id` equals `k` and points at a real node; at most\n  one capsule per node.\n- Every connector that a trigger references via `provider` should appear in\n  `connectors[]` (warning otherwise).\n\n## Node kinds (host vocabulary)\n\n| Kind | Use it for | Notes |\n|---|---|---|\n| `action` | Concrete work (normalize event, query API, run a command). | Default. |\n| `waitpoint` | Pause until an event\u002Fdelay\u002Fapproval resumes the workflow. | Pair with a `delay` or matching trigger. |\n| `notification` | Send a user-facing message. | Surface via host UX. |\n| `agent` \u002F `subagent` | Agent-loop stages and delegated workers. | Map to `kind: \"agent\" \\| \"subagent\"`. |\n| `approval` | HITL gate. | Validator categorizes `approval`\u002F`hitl`. |\n| `connector_call` | Outbound connector method. | Validator categorizes `connector` \u002F `connector_call`. |\n| `terminal` | Explicit success\u002Ffailure sink. | Optional. |\n\nAnything else is treated as a free-form node kind and rendered as-is — prefer\nthe canonical list above.\n\n## Recipes\n\n| Recipe | What it shows |\n|---|---|\n| `recipes\u002Fpr-monitor\u002Fbundle.json` | GitHub PR open\u002Fsync trigger → wait for deploy → log query → notify, with retry+catchup policy and `act_with_approval`. |\n| `recipes\u002Fpr-repair\u002Fbundle.json` | Periodic + GitHub-failure dual trigger → worktree setup → repair agent stage → approval gate → notify, with autonomous repair policy. |\n\nRun any recipe end-to-end:\n\n```bash\nharn workflow validate --bundle examples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-monitor\u002Fbundle.json --json\nharn workflow preview  --bundle examples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-monitor\u002Fbundle.json --mermaid\nharn workflow run      --bundle examples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-monitor\u002Fbundle.json --json\n```\n\n## Eval harness\n\n`eval.harn` is the local-model authoring eval. Point it at any case in\n`cases\u002F` and any provider\u002Fmodel:\n\n```bash\nharn run examples\u002Fskill-packs\u002Fworkflow-authoring\u002Feval.harn -- \\\n  --case cases\u002Fpr-monitor.case.json \\\n  --provider ollama --model qwen3:4b\n```\n\nThe script feeds the case prompts to the model and extracts the `\u003Cbundle>`\nblock. It then runs the validate → preview → run pipeline and prints a JSON\nreport with\n`{validation_passed, preview_passed, run_passed, structural_assertions, ...}`.\n\n`cases\u002F*.golden_bundle` is the canonical expected bundle. The Rust regression\ngate (`crates\u002Fharn-cli\u002Ftests\u002Fharn_cli_e2e\u002Fworkflow_authoring_eval.rs`) loads every case +\nrecipe, asserts the goldens validate \u002F preview \u002F run, and asserts the\nstructural assertions hold. Add a case → CI catches drift.\n\n## Workflow patch authoring\n\nWhen the user wants to **modify** an existing bundle, emit a **workflow\npatch** instead of rewriting it. Modifying covers inserting a verifier\nbetween two stages, adding an approval gate, or narrowing a node's tool\npolicy.\n\nPatches are auditable JSON. Harn applies them to a copy of the bundle,\nruns the validator, and computes a structural diff. It rejects anything\nthat widens the parent capability ceiling.\n\n```bash\nharn workflow patch validate \\\n    --bundle pr-monitor.bundle.json \\\n    --patch  pr-verifier.patch.json \\\n    --parent-ceiling \u002Fpath\u002Fto\u002Fparent.json --json\nharn workflow patch apply --bundle ... --patch ... --out ... --json\nharn workflow patch preview --bundle ... --patch ... --mermaid\n```\n\nThe patch JSON is a flat list of operations:\n\n| `op` | Purpose | Required fields |\n|---|---|---|\n| `insert_node` | Add a workflow node (agent, verifier, approval, notification). | `node_id`, optional `node` body |\n| `add_edge` | Connect two existing nodes. | `from`, `to`, optional `branch`, `label` |\n| `upsert_prompt_capsule` | Insert or replace a prompt capsule for a node. | `capsule_id`, `capsule.{node_id, prompt}` |\n| `update_node_policy` | Patch a node's `task_label` \u002F `prompt` \u002F `system` \u002F `tools` \u002F `model_policy` \u002F `capability_policy` \u002F `approval_policy`. | `node_id`, `policy.\u003Cfield>` |\n| `update_bundle_policy` | Patch bundle-level `autonomy_tier` \u002F `tool_policy` \u002F `approval_required` \u002F `retry` \u002F `catchup`. | `policy.\u003Cfield>` |\n\n**Hard rules — the validator enforces them:**\n\n- The patch must declare `schema_version: 1` and a non-empty `id`.\n- An empty `operations` list is rejected (patches must do something).\n- `insert_node` fails on a duplicate id; `add_edge` fails on a duplicate\n  edge or unknown endpoint; `upsert_prompt_capsule` fails when another\n  capsule already targets the same node.\n- A patched bundle that widens any of `tools`, `capabilities`,\n  `side_effect_level`, `workspace_roots`, connector scopes, command\n  gates, or `autonomy_tier` against `--parent-ceiling` is rejected with\n  per-dimension `widening` violations. **Patches never expand\n  permissions.**\n\nWorked example: `recipes\u002Fpr-monitor-verifier-patch\u002Fpatch.json` inserts\na deterministic verifier and a repair branch into the PR-monitor recipe\nand validates against the canonical fixture.\n\n## Safe Harn function tools\n\n`harn workflow function-tools --json` lists the allowlisted Harn\nfunctions an agent may call from inside the patch-authoring loop. Every\ndescriptor is read-only or pure-think, with an ACP-aligned\n`ToolAnnotations` block. So hosts can wire them straight into a model's\ntool surface without auditing each one separately. The current\nallowlist:\n\n- `workflow_bundle_validate` — validate a bundle JSON file at a path.\n- `workflow_bundle_preview` — normalized graph + mermaid + editable fields.\n- `workflow_bundle_capability_ceiling` — capability ceiling the bundle would request.\n- `workflow_patch_validate` — apply + validate a patch in memory and return the report.\n\nAdding a function to this list is a deliberate, reviewed change in\n`crates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fsafe_function_tools.rs`. The default\nposture is \"not exposed.\"\n\n## Nested invocation ceiling\n\nA Harn script under an active execution policy can launch another Harn\ninvocation: `harn run`, `harn workflow run`, `harn supervisor\nfire\u002Freplay`, or a Burin harness. The parent must scan the target and\nreject anything that asks for more than its own ceiling.\n`harn workflow nested-ceiling --bundle \u003Cpath> --parent \u003Cpolicy>` exposes\nthe same scanner used internally so hosts can sanity-check before\nlaunching.\n\n## Pointers\n\n- Bundle contract: [`docs\u002Fsrc\u002Fworkflow-bundles.md`](..\u002F..\u002F..\u002Fdocs\u002Fsrc\u002Fworkflow-bundles.md)\n- Trigger \u002F connector providers: [`docs\u002Fllm\u002Fharn-triggers-quickref.md`](..\u002F..\u002F..\u002Fdocs\u002Fllm\u002Fharn-triggers-quickref.md)\n- Supervisor commands: [`docs\u002Fsrc\u002Fworkflow-supervisor.md`](..\u002F..\u002F..\u002Fdocs\u002Fsrc\u002Fworkflow-supervisor.md)\n- Validator source of truth: [`crates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fworkflow_bundle.rs`](..\u002F..\u002F..\u002Fcrates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fworkflow_bundle.rs)\n- Patch contract source: [`crates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fworkflow_patch.rs`](..\u002F..\u002F..\u002Fcrates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fworkflow_patch.rs)\n- Safe function-tool allowlist: [`crates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fsafe_function_tools.rs`](..\u002F..\u002F..\u002Fcrates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fsafe_function_tools.rs)\n- Nested invocation guard: [`crates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fnested_invocation.rs`](..\u002F..\u002F..\u002Fcrates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fnested_invocation.rs)\n","# Workflow authoring (Harn workflow bundles)\n\nYou are authoring a **portable workflow bundle** — a JSON file Harn validates,\npreviews, and runs locally. Hosts (IDE TUI\u002FGUI, cloud-platform importers) consume\nthe same bundle without rewriting.\n\nRead **`prompting.md`** in this directory before composing a response. It\ndefines the response sections, JSON envelope, and small-model rules. Every\nrecipe under `recipes\u002F` is a worked, validated example you can crib from.\n\n## What good output looks like\n\n1. A single `\u003Cbundle>` block containing valid JSON for a `WorkflowBundle`.\n2. A short `\u003Crationale>` block (≤ 5 bullets) explaining the trigger, the\n   waitpoints, and the connector requirements.\n3. A `\u003Cverify>` block listing the exact commands the user should run:\n\n   ```bash\n   harn workflow validate --bundle out.bundle.json --json\n   harn workflow preview  --bundle out.bundle.json --json\n   harn workflow run      --bundle out.bundle.json --json\n   ```\n\nIf validation fails, **read the diagnostic, edit the bundle, and re-validate**.\nDo not invent fields or kinds — the validator's enum lists are the source of\ntruth.\n\n## Bundle skeleton\n\n```json\n{\n  \"schema_version\": 2,\n  \"entrypoint\": \"workflows\u002F\u003Ckebab-case-id>.harn\",\n  \"transitive_modules\": [\n    {\n      \"path\": \"workflows\u002F\u003Ckebab-case-id>.harn\",\n      \"source_hash_blake3\": \"blake3:\u003C64 lowercase hex digits>\",\n      \"harnbc_hash_blake3\": \"blake3:\u003C64 lowercase hex digits>\"\n    }\n  ],\n  \"stdlib_version\": \"\u003Charn stdlib version>\",\n  \"harn_version\": \"\u003Charn version>\",\n  \"provider_catalog_hash\": \"blake3:\u003C64 lowercase hex digits>\",\n  \"tool_manifest\": [],\n  \"sbom\": {\n    \"format\": \"spdx-lite\",\n    \"version\": \"2.3\",\n    \"packages\": [],\n    \"relationships\": []\n  },\n  \"signature\": null,\n  \"parent_trust_record_id\": null,\n  \"id\": \"\u003Ckebab-case-id>\",\n  \"name\": \"\u003Chuman label>\",\n  \"version\": \"1.0.0\",\n  \"triggers\": [\n    { \"id\": \"\u003Ctrigger-id>\", \"kind\": \"github|cron|delay|webhook|mcp|manual\",\n      \"provider\": \"github\", \"events\": [\"pull_request.opened\"],\n      \"node_id\": \"\u003Centry-node-id>\" }\n  ],\n  \"workflow\": {\n    \"_type\": \"workflow_graph\",\n    \"id\": \"\u003Cgraph-id>\",\n    \"version\": 1,\n    \"entry\": \"\u003Centry-node-id>\",\n    \"nodes\": {\n      \"\u003Cnode-id>\": { \"id\": \"\u003Cnode-id>\", \"kind\": \"action|waitpoint|notification\",\n                     \"task_label\": \"\u003Cshort label>\" }\n    },\n    \"edges\": [ { \"from\": \"\u003Cfrom-node-id>\", \"to\": \"\u003Cto-node-id>\" } ]\n  },\n  \"prompt_capsules\": {\n    \"\u003Ccapsule-id>\": { \"id\": \"\u003Ccapsule-id>\", \"node_id\": \"\u003Cnode-id>\",\n                      \"trigger_id\": \"\u003Ctrigger-id>\",\n                      \"prompt\": \"\u003Cself-contained continuation prompt>\" }\n  },\n  \"policy\": {\n    \"autonomy_tier\": \"shadow|suggest|act_with_approval|act_auto\",\n    \"retry\":   { \"max_attempts\": 2, \"backoff\": \"exponential\" },\n    \"catchup\": { \"mode\": \"none|latest|all\", \"max_events\": 1 }\n  },\n  \"connectors\": [\n    { \"id\": \"github\", \"provider_id\": \"github\",\n      \"scopes\": [\"pull_requests:read\", \"checks:read\"],\n      \"setup_required\": true, \"status_required\": true }\n  ],\n  \"environment\": {\n    \"repo_setup_profile\": \"default\",\n    \"worktree_policy\": \"reuse_current|new_worktree|host_managed\",\n    \"command_gates\": [\"make test\"]\n  }\n}\n```\n\n## Hard rules (validator enforces)\n\n- `schema_version` must be `2`.\n- `entrypoint`, `transitive_modules`, `stdlib_version`, `harn_version`,\n  `provider_catalog_hash`, `tool_manifest`, `sbom`, `signature`, and\n  `parent_trust_record_id` are part of the canonical `.harnpack` manifest.\n- BLAKE3 fields use `blake3:\u003C64 lowercase hex digits>`.\n- `id`, `version`, `workflow.id`, `workflow.entry` are non-empty.\n- Every `workflow.nodes[k].id` matches its map key `k`.\n- Every edge endpoint and `trigger.node_id` references an existing node.\n- `policy.autonomy_tier` ∈ `{shadow, suggest, act_with_approval, act_auto}`.\n- `policy.catchup.mode` ∈ `{none, latest, all}`.\n- `policy.retry.max_attempts >= 1`.\n- `environment.worktree_policy` ∈ `{reuse_current, new_worktree, host_managed}`.\n- Trigger kind requirements:\n  - `github` → `provider: \"github\"` and at least one `events[]`.\n  - `cron` → `schedule`.\n  - `delay` → `delay` (ISO-8601 duration, e.g. `PT10M`).\n  - `webhook` → `webhook_path`.\n  - `mcp` → `mcp_tool`.\n  - `manual` → no extra fields.\n- Every `prompt_capsules[k].id` equals `k` and points at a real node; at most\n  one capsule per node.\n- Every connector that a trigger references via `provider` should appear in\n  `connectors[]` (warning otherwise).\n\n## Node kinds (host vocabulary)\n\n| Kind | Use it for | Notes |\n|---|---|---|\n| `action` | Concrete work (normalize event, query API, run a command). | Default. |\n| `waitpoint` | Pause until an event\u002Fdelay\u002Fapproval resumes the workflow. | Pair with a `delay` or matching trigger. |\n| `notification` | Send a user-facing message. | Surface via host UX. |\n| `agent` \u002F `subagent` | Agent-loop stages and delegated workers. | Map to `kind: \"agent\" \\| \"subagent\"`. |\n| `approval` | HITL gate. | Validator categorizes `approval`\u002F`hitl`. |\n| `connector_call` | Outbound connector method. | Validator categorizes `connector` \u002F `connector_call`. |\n| `terminal` | Explicit success\u002Ffailure sink. | Optional. |\n\nAnything else is treated as a free-form node kind and rendered as-is — prefer\nthe canonical list above.\n\n## Recipes\n\n| Recipe | What it shows |\n|---|---|\n| `recipes\u002Fpr-monitor\u002Fbundle.json` | GitHub PR open\u002Fsync trigger → wait for deploy → log query → notify, with retry+catchup policy and `act_with_approval`. |\n| `recipes\u002Fpr-repair\u002Fbundle.json` | Periodic + GitHub-failure dual trigger → worktree setup → repair agent stage → approval gate → notify, with autonomous repair policy. |\n\nRun any recipe end-to-end:\n\n```bash\nharn workflow validate --bundle examples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-monitor\u002Fbundle.json --json\nharn workflow preview  --bundle examples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-monitor\u002Fbundle.json --mermaid\nharn workflow run      --bundle examples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-monitor\u002Fbundle.json --json\n```\n\n## Eval harness\n\n`eval.harn` is the local-model authoring eval. Point it at any case in\n`cases\u002F` and any provider\u002Fmodel:\n\n```bash\nharn run examples\u002Fskill-packs\u002Fworkflow-authoring\u002Feval.harn -- \\\n  --case cases\u002Fpr-monitor.case.json \\\n  --provider ollama --model qwen3:4b\n```\n\nThe script feeds the case prompts to the model and extracts the `\u003Cbundle>`\nblock. It then runs the validate → preview → run pipeline and prints a JSON\nreport with\n`{validation_passed, preview_passed, run_passed, structural_assertions, ...}`.\n\n`cases\u002F*.golden_bundle` is the canonical expected bundle. The Rust regression\ngate (`crates\u002Fharn-cli\u002Ftests\u002Fharn_cli_e2e\u002Fworkflow_authoring_eval.rs`) loads every case +\nrecipe, asserts the goldens validate \u002F preview \u002F run, and asserts the\nstructural assertions hold. Add a case → CI catches drift.\n\n## Workflow patch authoring\n\nWhen the user wants to **modify** an existing bundle, emit a **workflow\npatch** instead of rewriting it. Modifying covers inserting a verifier\nbetween two stages, adding an approval gate, or narrowing a node's tool\npolicy.\n\nPatches are auditable JSON. Harn applies them to a copy of the bundle,\nruns the validator, and computes a structural diff. It rejects anything\nthat widens the parent capability ceiling.\n\n```bash\nharn workflow patch validate \\\n    --bundle pr-monitor.bundle.json \\\n    --patch  pr-verifier.patch.json \\\n    --parent-ceiling \u002Fpath\u002Fto\u002Fparent.json --json\nharn workflow patch apply --bundle ... --patch ... --out ... --json\nharn workflow patch preview --bundle ... --patch ... --mermaid\n```\n\nThe patch JSON is a flat list of operations:\n\n| `op` | Purpose | Required fields |\n|---|---|---|\n| `insert_node` | Add a workflow node (agent, verifier, approval, notification). | `node_id`, optional `node` body |\n| `add_edge` | Connect two existing nodes. | `from`, `to`, optional `branch`, `label` |\n| `upsert_prompt_capsule` | Insert or replace a prompt capsule for a node. | `capsule_id`, `capsule.{node_id, prompt}` |\n| `update_node_policy` | Patch a node's `task_label` \u002F `prompt` \u002F `system` \u002F `tools` \u002F `model_policy` \u002F `capability_policy` \u002F `approval_policy`. | `node_id`, `policy.\u003Cfield>` |\n| `update_bundle_policy` | Patch bundle-level `autonomy_tier` \u002F `tool_policy` \u002F `approval_required` \u002F `retry` \u002F `catchup`. | `policy.\u003Cfield>` |\n\n**Hard rules — the validator enforces them:**\n\n- The patch must declare `schema_version: 1` and a non-empty `id`.\n- An empty `operations` list is rejected (patches must do something).\n- `insert_node` fails on a duplicate id; `add_edge` fails on a duplicate\n  edge or unknown endpoint; `upsert_prompt_capsule` fails when another\n  capsule already targets the same node.\n- A patched bundle that widens any of `tools`, `capabilities`,\n  `side_effect_level`, `workspace_roots`, connector scopes, command\n  gates, or `autonomy_tier` against `--parent-ceiling` is rejected with\n  per-dimension `widening` violations. **Patches never expand\n  permissions.**\n\nWorked example: `recipes\u002Fpr-monitor-verifier-patch\u002Fpatch.json` inserts\na deterministic verifier and a repair branch into the PR-monitor recipe\nand validates against the canonical fixture.\n\n## Safe Harn function tools\n\n`harn workflow function-tools --json` lists the allowlisted Harn\nfunctions an agent may call from inside the patch-authoring loop. Every\ndescriptor is read-only or pure-think, with an ACP-aligned\n`ToolAnnotations` block. So hosts can wire them straight into a model's\ntool surface without auditing each one separately. The current\nallowlist:\n\n- `workflow_bundle_validate` — validate a bundle JSON file at a path.\n- `workflow_bundle_preview` — normalized graph + mermaid + editable fields.\n- `workflow_bundle_capability_ceiling` — capability ceiling the bundle would request.\n- `workflow_patch_validate` — apply + validate a patch in memory and return the report.\n\nAdding a function to this list is a deliberate, reviewed change in\n`crates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fsafe_function_tools.rs`. The default\nposture is \"not exposed.\"\n\n## Nested invocation ceiling\n\nA Harn script under an active execution policy can launch another Harn\ninvocation: `harn run`, `harn workflow run`, `harn supervisor\nfire\u002Freplay`, or a Burin harness. The parent must scan the target and\nreject anything that asks for more than its own ceiling.\n`harn workflow nested-ceiling --bundle \u003Cpath> --parent \u003Cpolicy>` exposes\nthe same scanner used internally so hosts can sanity-check before\nlaunching.\n\n## Pointers\n\n- Bundle contract: [`docs\u002Fsrc\u002Fworkflow-bundles.md`](..\u002F..\u002F..\u002Fdocs\u002Fsrc\u002Fworkflow-bundles.md)\n- Trigger \u002F connector providers: [`docs\u002Fllm\u002Fharn-triggers-quickref.md`](..\u002F..\u002F..\u002Fdocs\u002Fllm\u002Fharn-triggers-quickref.md)\n- Supervisor commands: [`docs\u002Fsrc\u002Fworkflow-supervisor.md`](..\u002F..\u002F..\u002Fdocs\u002Fsrc\u002Fworkflow-supervisor.md)\n- Validator source of truth: [`crates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fworkflow_bundle.rs`](..\u002F..\u002F..\u002Fcrates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fworkflow_bundle.rs)\n- Patch contract source: [`crates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fworkflow_patch.rs`](..\u002F..\u002F..\u002Fcrates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fworkflow_patch.rs)\n- Safe function-tool allowlist: [`crates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fsafe_function_tools.rs`](..\u002F..\u002F..\u002Fcrates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fsafe_function_tools.rs)\n- Nested invocation guard: [`crates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fnested_invocation.rs`](..\u002F..\u002F..\u002Fcrates\u002Fharn-vm\u002Fsrc\u002Forchestration\u002Fnested_invocation.rs)\n",{"name":5,"short":51,"description":52,"when-to-use":53,"allowed_tools":54},"Author Harn portable workflow bundles for day-to-day engineering automations.","Generate, validate, preview, and run portable Harn workflow bundle JSON for\nmonitoring and repairing pull requests, deploys, logs, and other event-driven\nengineering work. Optimized for smaller models (qwen, gemma, llama.cpp) with\nexplicit XML sections, strict JSON output, and a validation-and-retry loop.\n","Use when the user asks for a durable engineering automation expressed as a\nHarn workflow bundle: monitor this PR, wait for deploy then query logs,\nrepair failing checks, schedule a recurring health probe, or import a\nworkflow into Burin \u002F a host. Pair with the workflow CLI: `harn workflow\nvalidate|preview|run --bundle \u003Cpath> --json`.\n",[55,56,57,58,59,60,61,62,63,64],"Bash(harn workflow validate:*)","Bash(harn workflow preview:*)","Bash(harn workflow run:*)","Bash(harn workflow patch:*)","Bash(harn workflow function-tools:*)","Bash(harn workflow nested-ceiling:*)","Bash(harn check:*)","Read","Write","Edit","main","a52b7979c25b6be41bc82c4a6e583959a048f618","examples\u002Fskill-packs\u002Fworkflow-authoring",6,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn","https:\u002F\u002Fharnlang.com","https:\u002F\u002Fgithub.com\u002Fburin-labs","2026-11-15 03:42:47",{"source":8,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add burin-labs\u002Fharn --skill workflow-authoring",{"tool":79,"command":80},"bunx","bunx skills add burin-labs\u002Fharn --skill workflow-authoring",{"tool":82,"command":83},"pnpm","pnpm dlx skills add burin-labs\u002Fharn --skill workflow-authoring","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002FSKILL.md",true,[87,93,97,103,107,111,115,119,123,127],{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"cases\u002Fpr-monitor.case.json","REFERENCE","参考文档",1396,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002Fcases\u002Fpr-monitor.case.json",{"path":94,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":95,"sourceHtmlUrl":96},"cases\u002Fpr-repair.case.json",1835,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002Fcases\u002Fpr-repair.case.json",{"path":98,"resourceType":99,"resourceTypeDesc":100,"sizeBytes":101,"sourceHtmlUrl":102},"eval.harn","OTHER","其他",7155,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002Feval.harn",{"path":104,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":105,"sourceHtmlUrl":106},"prompting.md",6337,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002Fprompting.md",{"path":108,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":109,"sourceHtmlUrl":110},"recipes\u002Fpr-monitor-verifier-patch\u002Fpatch.json",1291,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-monitor-verifier-patch\u002Fpatch.json",{"path":112,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":113,"sourceHtmlUrl":114},"recipes\u002Fpr-monitor-verifier-patch\u002FREADME.md",2195,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-monitor-verifier-patch\u002FREADME.md",{"path":116,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":117,"sourceHtmlUrl":118},"recipes\u002Fpr-monitor\u002Fbundle.json",2976,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-monitor\u002Fbundle.json",{"path":120,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":121,"sourceHtmlUrl":122},"recipes\u002Fpr-monitor\u002FREADME.md",1521,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-monitor\u002FREADME.md",{"path":124,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":125,"sourceHtmlUrl":126},"recipes\u002Fpr-repair\u002Fbundle.json",4017,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-repair\u002Fbundle.json",{"path":128,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":129,"sourceHtmlUrl":130},"recipes\u002Fpr-repair\u002FREADME.md",1747,"https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Fskill-packs\u002Fworkflow-authoring\u002Frecipes\u002Fpr-repair\u002FREADME.md",[132,152,172,186,205,218],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":46},"01M6J9Y4B3NZ9C24GN47159AEQ","stream-fan-in","Stream trigger example for routing or grouping event batches.","https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Ftriggers\u002Fstream-fan-in\u002FSKILL.md",[],[139,140,141,142,143,144,145,146,147,148,149,150,151],"stream","stream fan in","routing","customize","trigger","pipeline","for","batches","event","events","grouping","example","use",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":46},"01M6J9WNJHJV0K3CBZJFG8GD1R","github-stale-pr-nudger","Cron recipe for scanning repositories and nudging old pull requests.","https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Ftriggers\u002Fgithub-stale-pr-nudger\u002FSKILL.md",[],[159,160,161,162,163,145,164,165,166,167,168,151,169,170,171,142,45],"github stale pr nudger","stale","github","pr","requests","scheduled","follow-up","recipe","up","scanning","cron","pull","pull request",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":46},"01M6J9Y7X1D3ZSWWAG1GXFTWWY","webhook-generic-hmac","Generic webhook recipe with signed inbound requests.","https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Ftriggers\u002Fwebhook-generic-hmac\u002FSKILL.md",[],[179,180,181,142,29,163,182,166,143,183,184,185,151],"generic","webhook","webhook generic hmac","with","webhook trigger","provider","webhooks",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":195,"publishedAt":46},"01M6J9Y10NVP86YMXCD9FQ2XZV","slack-thread-summarizer","Slack webhook recipe with a local summarize predicate.","https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Ftriggers\u002Fslack-thread-summarizer\u002FSKILL.md",[192],{"categoryNo":193,"categoryName":194,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000005","邮件与沟通",[196,197,198,199,200,201,29,202,203,182,180,166,143,142,204,151],"slack thread","slack thread summarizer","thread","summarizer","slack","local","summaries","threads","summarize",{"skillNo":206,"name":207,"nameZh":6,"description":208,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":209,"categories":210,"keywords":212,"publishedAt":46},"01M6J9XWKSBQJ881KBP2TGMN3Z","slack-reaction-action","Slack Events API recipe for reaction_added workflows.","https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Ftriggers\u002Fslack-reaction-action\u002FSKILL.md",[211],{"categoryNo":193,"categoryName":194,"taxonomyType":21,"taxonomyTypeDesc":22},[200,213,214,145,151,29,165,148,166,143,215,167,35,216,142,217],"action","slack reaction action","reactions","api","workflows",{"skillNo":219,"name":220,"nameZh":6,"description":221,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":222,"categories":223,"keywords":225,"publishedAt":46},"01M6J9XRE6PD3J99VKA1TYWS9Y","slack-keyword-router","Slack webhook recipe for routing messages by keyword.","https:\u002F\u002Fgithub.com\u002Fburin-labs\u002Fharn\u002Fblob\u002Fmain\u002Fexamples\u002Ftriggers\u002Fslack-keyword-router\u002FSKILL.md",[224],{"categoryNo":193,"categoryName":194,"taxonomyType":21,"taxonomyTypeDesc":22},[226,227,200,228,151,144,229,141,142,180,29,230,145,166],"slack keyword router","router","simple","messages","slack messages"]