# Capability Resource

Capabilities describe executable work that workflow task nodes reference. A role
can require a capability, and assignments decide whether a human or agent
performs it.

```yaml
apiVersion: kora/v1
kind: Capability
metadata:
  name: assess-change
  category: engineering
spec:
  description: Review pull request changes and produce a decision.
  agentConfig:
    mode: agentic
    requiresOutputReview: true
    systemPrompt: |
      Review the pull request data and return the declared output.
    output:
      schemaRef: ReviewDecision
      maxRepairAttempts: 2
  humanConfig:
    summary: Review pull request
    guide: Check risk, tests, and deployment impact.
    priority: normal
```

Rules:

- Every capability must define at least one of `spec.humanConfig` or
  `spec.agentConfig`; a description by itself is not executable. Use
  `humanConfig: {}` when human execution is supported but no optional guidance
  fields are needed.
- `agentConfig` is used when the assigned role resolves to an agent.
- `agentConfig.requiresOutputReview` requires successful agent output to take
  the producer task's `agentOutputReview` edge. It does not create a review
  task, select a reviewer, or authorize tools. The workflow must provide the
  explicit human review task and its role, capability, assignment, output, and
  timer behavior. The producer object output type must set top-level
  `additionalProperties: false`.
- `humanConfig` is used when the assigned role resolves to a person.
- Omit `agentConfig.model` to use the deployment default agent model. If a
  capability needs a different supported model, set `agentConfig.model.ref` and
  ensure the target environment has that model key saved in Settings > Agent
  models.
- Use `agentConfig.extensions` to enable installed extension tools and skills
  for agent tasks; use object-form selections when the capability should expose
  only specific registered tools or skills.
- Human task routing is Platform/Core task state. Notification uses the runtime
  human-task hook; provider delivery is supplied by installed extensions, not
  `humanConfig` fields or workflow service nodes.
- Every human-assigned `task` must declare an object output type, and every
  human-assigned `task.each` must declare an object `itemOutput` type. The
  declared type owns both the review UI and completion validation.
- Keep capability descriptions focused on the work, not on provider plumbing.
