Synced from Hive. This page is pulled from hivecommons/hive@v5 during the docs build. Edit the canonical source in the Hive repository.
Workflows in hive
Hive works with three kinds of workflow. They answer different questions, and only one of them is something hive runs itself.
| Kind | What it describes | Where it lives | Status |
|---|---|---|---|
| Lifecycle workflow model | How an issue or pull request moves from opened to merged (and on to release or deploy): its states, who moves it, and which agent works in which state | Settings → Workflows, stored per hive | Available |
| Imported CI pipeline | The DAG of jobs or tasks a repository already runs in GitHub Actions or Tekton | Inside a lifecycle model, under spec.pipelines | Available (observed, not executed) |
| DAG task workflow | A graph of steps that hive itself schedules and runs | Not yet available | Coming soon |
Lifecycle workflow models
A workflow model is a declarative state machine for a repository’s issues and pull requests,
written in the workflow.hivecommons.dev/v1alpha1 format (kind: WorkflowModel). Every hive
starts with the built-in hive-default model, which is the lifecycle the Activity Monitor
columns show today: Open, Actionable, Claimed, PR in progress, CI / Review, Merge queue,
Merged.
A model can declare:
- States and columns. The states an item can be in, grouped into the Activity Monitor
columns. A state can be
parallelwith nested regions (for example review and CI running at the same time) orfinal. - Transitions and guards. Moves between states, each fired by an event (a fact such as
pr.checks is greenorlabels has triage/accepted) and optionally held by a guard such as required checks or an environment approval. - Roles and human gates. Named roles (maintainer, approver, reviewer, author) and gates a role must release before a transition happens. The compiler refuses a model in which an agent can reach a terminal outcome without crossing a gate owned by a human role.
- Agent grants and dispatch. Which agent profile may act in which states, and where hive hands an item to that profile. A hive maps each profile to one of its own agents; the grant describes the work and never widens what the agent’s session may do.
- Derivation rules. How hive works out an item’s current state from facts it already
observes.
hive-defaultand ingested models use the built-in derivation; custom models use ordered rules.
You bind a model to a repository on Settings → Repos (the per-repository Workflow select). With Derive stages from bound models off (Settings → Workflows → Library), a binding only changes the Activity Monitor columns. With it on, hive derives the repository’s stages from the model’s rules, provisions the model’s labels and dispatches agents per state.
Use a lifecycle model when you want hive to follow a process that differs from the default: an intake form and triage step, a review gate owned by named people, an assessment loop with a drafting agent and a verifying agent.
- Reference: Workflow models covers the format, the compiler, the editor, Simulate, versions and the marketplace.
- Worked example: CNCF TechDocs AI-assisted assessment is the first curated model in the marketplace (Settings → Workflows → Marketplace). It shows intake, agent dispatch to a drafter and a verifier, and a human gate after every agent step.
- Agent side: Agent configuration covers the agents that fill a model’s profiles, and Kick refusals explains what you see when an agent declines a hand-off.
Imported CI pipelines (GitHub Actions and Tekton)
Hive can read the CI definitions a repository already has and turn them into a draft lifecycle model. This is called ingest. It reads:
- GitHub Actions workflow files (
.github/workflows/*.ymland*.yaml); - Tekton
Pipeline,PipelineRunand Tekton Triggers resources, from files in the repository (including Pipelines-as-CodePipelineRuns) or from a live cluster throughkubectl.
Each workflow file or Tekton pipeline becomes a pipeline in the model: a DAG whose nodes
are jobs or tasks and whose edges come from needs (GitHub Actions) or runAfter and result
references (Tekton). Hive derives each pipeline’s role from its triggers and binds it into the
lifecycle: pull-request pipelines sit on the CI / Review states, and pipelines that run after
merge (default-branch CI, release, deploy) add Main CI, Release, Deploy and Done columns after
Merged.
Hive renders these pipelines and records what it found; it does not execute them. The
jobs and tasks keep running in GitHub Actions or Tekton exactly as before. Ingest never uses an
LLM: the same YAML always produces the same model. Everything ingest adds is marked
confidence: inferred and the model is saved with provenance ingested-unreviewed, so a
person reviews it before binding it to a repository.
Use ingest when you want a starting model that already knows your CI, instead of writing one by hand.
Ingest also accepts a written process document (POST /api/workflows/ingest/spec, the
From a written spec panel on the Ingest view), which becomes a draft model with every
element inferred. See Workflow models for that path.
DAG task workflows (coming soon)
Executable DAG task workflows, where hive itself schedules and runs a graph of steps, are being built and are not available in a released hive yet. This page will link to their guide once the feature lands.
Until then, hive starts agent work in two ways that exist today: a lifecycle model’s agent dispatch (above), and CEL triggers, which kick an agent when an event such as an issue being labeled matches a rule.
Comparison
| Lifecycle workflow model | Imported CI pipeline | DAG task workflow | |
|---|---|---|---|
| Describes | Issue and PR states, transitions, roles, gates | Jobs or tasks and their dependencies | Steps and their dependencies |
| Source | Built-in hive-default, the editor, the marketplace, or ingest | GitHub Actions files, Tekton files, a Tekton cluster | Not yet available |
| Hive executes it | Yes: hive derives each item’s state and dispatches agents per state (with derivation on) | No: hive reads and renders it; GitHub Actions or Tekton runs it | Planned |
| Shown in the dashboard | Activity Monitor columns, Settings → Workflows | Inside the model: diagram, citations, raw JSON | Not yet available |
| Human gates | Yes, required on every agent path | No (runs are outside hive) | Not yet available |
| Bound per repository | Yes, Settings → Repos | Only as part of a model | Not yet available |