Workflow Extension Lifecycle

Workflows turn tools, agents, connectors, approvals, and artifacts into repeatable execution paths. A workflow can be a built-in runtime template, a saved workflow draft, an automation workflow, or a project workflow selected by the coordinator bridge.

Adding or changing a workflow is a runtime contract change. Treat it as more than a designer layout: it defines who can trigger work, which tools and profiles run, what side effects are possible, what evidence is produced, and how completion is verified.

Lifecycle

  1. Choose the workflow kind and owner.
  2. Define the trigger and input contract.
  3. Model the graph with explicit nodes and connectors.
  4. Bind roles to agent profiles, tools, skills, and policy classes.
  5. Declare approval behavior for repo writes, external writes, and other high-risk actions.
  6. Define output artifacts and structured results.
  7. Add verifier, smoke, and negative tests.
  8. Document operator-facing review steps.
  9. Verify capability inventory and project/profile reachability.

Choose The Workflow Shape

Use the smallest workflow shape that matches the job.

Shape Use when
Built-in workflow template The runtime needs a stable reusable scaffold such as coding, analysis, QA, research, provider smoke, or self-development.
Saved automation workflow A local operator wants a repeatable manual, scheduled, webhook, or future file-watch workflow.
Project workflow The coordinator should use a project-specific graph for a known runtime template.
Child workflow A parent workflow needs to call another saved workflow and keep traceable child-run output.

Do not seed customer-specific workflows as built-in Aegis fixtures. Keep project-specific report packages, account choices, and client-specific profile mappings in saved workflow or project data.

Template Contract

Built-in workflow templates are validated by workflowTemplateSchema and should declare:

Field Purpose
id Stable template id used by coordinator runs, saved project workflows, capabilities, and tests.
version Template version. Bump when role order, task shape, approval behavior, or output contract changes.
stages Ordered runtime phases such as intake, plan, execute, verify, repair, review, or finalize.
roles Stable role names used by task sessions and profile records.
taskTemplates Role/objective pairs that describe delegated work.
agentProfiles Optional role defaults for provider, model, prompt profile, tools, skills, and policy class.
repairPolicy Optional bounded repair behavior.
allowedTools Permission tokens available to the workflow.
verifierConfig Verifier or smoke metadata required by the runtime.
approvalRules Action types that require approval.

Saved workflow drafts use graph data: nodes, connectors, runtime, and optional template metadata. Nodes should stay user-level and executable; do not expose every internal field, retry note, output key, or bookkeeping concern as its own visible node.

Trigger And Input Contract

Every workflow needs a clear trigger and bounded input shape.

Common triggers:

Inputs should be explicit enough to replay and test:

If required trigger details are missing, ask the operator before queuing work. Do not encode uncertainty as a failed test result.

Graph And Connector Rules

Workflow graphs should be readable at the operator level.

Avoid adding manual approval nodes just because a workflow creates a draft artifact. Add approval when the next action sends, mutates external state, writes a repo, changes Aegis configuration, or crosses another high-risk boundary.

Tools, Profiles, And Skills

Workflow permissions should come from explicit role/profile configuration, not hidden runtime assumptions.

For tool-level details, follow the Tool Extension Lifecycle.

Approval Behavior

High-risk actions need an explicit approval story before a workflow is considered complete.

Approval-sensitive examples:

Approval previews should bind the decision to concrete inputs: action type, target, account id, method, path, artifact path, content hash, expected side effect, and evidence to review.

Coordinators and agents should not be able to approve human-owned high-risk checkpoints.

Outputs And Artifacts

Workflows should produce durable evidence, not only model prose.

Expected outputs can include:

Downstream nodes should reference artifact paths or structured output fields, not scrape model text.

Verification

Completion should depend on evidence.

Use the right verification layer:

If the workflow produces a customer-facing or public artifact, fail closed when required evidence is missing.

Tests

Minimum coverage for a new or changed workflow:

Examples:

Operator Docs

Update docs when a workflow changes what operators can run or approve.

Document:

For workflow families that assemble other workflows, describe parent/child run traceability and where operators inspect child-run status.

Capability Inventory

Workflow templates appear in the capability inventory. Before calling a workflow complete, verify that the inventory communicates:

This keeps workflow extension visible before it becomes a path that coordinators, automations, or headless clients can trigger.

Review Checklist

Before merging a workflow change: