dotFactory Create account
All workflow ideas
After code lands on main

Update docs after a merge

Understand the landed change, draft a documentation update, and ask for approval before opening a docs pull request.

Workflow

One path from trigger to result
1
GitHub event
CI passes on main
2
Agent step
Draft documentation
3
Human gate
Review before PR
Factory definition
.fct
type WorkflowRun = { head_sha: text }
type Decision = enum { approve, revise }
type DocPatch = { summary: text, patch: text }

trigger ci_succeeded:
  kind: github
  config: {
    path: "/api/github/webhook"
    target: { one: { repo: "acme/app" } }
    event: workflow_run
    actions: ["completed"]
    workflows: ["CI"]
    branches: ["main"]
    run_events: ["push"]
    conclusions: ["success"]
  }
  out:
    run: WorkflowRun
    repository: { name: text, url: text }
    action: text
    sender: text

runner agent:
  kind: opencode
  in: open
  out: open

step draft_docs:
  runner: agent
  in:
    prompt: "Read the landed change and draft a docs-only patch."
    repo: { url: ci_succeeded.repository.url, ref: ci_succeeded.run.head_sha }
  out: { change: DocPatch }

step approve:
  kind: gate
  in: { summary: draft_docs.change.summary, patch: draft_docs.change.patch }
  out: { decision: Decision }

step open_docs_pr:
  runner: agent
  when: approve.decision == "approve"
  in:
    prompt: "Apply the approved patch and open a docs-only pull request."
    repo: { url: ci_succeeded.repository.url, ref: ci_succeeded.run.head_sha }
    patch: draft_docs.change.patch
  out: { pull_request_url: text }
Illustrative factory code. Connect the runner, repository access, and tools for your environment.