Files
cleveragents-core/docs/schema/automation_profile.schema.yaml
T
CoreRasurae 007af498b8
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 17s
CI / helm (pull_request) Successful in 33s
CI / lint (pull_request) Successful in 3m42s
CI / security (pull_request) Successful in 4m8s
CI / quality (pull_request) Successful in 4m9s
CI / typecheck (pull_request) Successful in 4m20s
CI / integration_tests (pull_request) Successful in 7m2s
CI / unit_tests (pull_request) Successful in 7m55s
CI / docker (pull_request) Successful in 1m19s
CI / coverage (pull_request) Successful in 8m46s
CI / e2e_tests (pull_request) Successful in 16m1s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 17s
CI / helm (push) Successful in 22s
CI / quality (push) Successful in 31s
CI / lint (push) Successful in 3m28s
CI / typecheck (push) Successful in 3m54s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m5s
CI / integration_tests (push) Successful in 6m13s
CI / unit_tests (push) Successful in 6m28s
CI / docker (push) Successful in 1m34s
CI / coverage (push) Successful in 12m5s
CI / e2e_tests (push) Successful in 18m47s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 28m0s
CI / benchmark-regression (pull_request) Successful in 59m48s
refactor(autonomy): rename automation profile task flags to spec names
Renamed all 11 task-type confidence threshold fields in AutomationProfile
from phase-transition semantics to spec-defined task-type semantics.
Updated all 8 built-in profiles, CLI formatting, YAML schema, services,
and all Behave/Robot tests referencing the old field names.

Post-review fixes:
- Fixed 24 stale old field names in M6 fixture files
  (automation_profiles.json, autonomy_guardrails.json)
- Added model_validator(mode='before') to detect legacy field names
  and raise actionable ValueError with rename mapping
- Added semantic bridge comments in PlanLifecycleService mapping
  task-type thresholds to phase-transition gates
- Added threshold_field to structured log messages for observability
- Restored categorised CLI automation-profile show output to match
  spec (Phase Transitions / Decision Automation / Self-Repair /
  Execution Controls) instead of flat list
- Added missing access_network field to spec show output examples
  (Rich, Plain, JSON, YAML variants)
- Aligned ADR-017 profile fields table to all 11 fields with
  descriptions matching spec Automatable Tasks table
- Aligned automation_profiles.md threshold descriptions with spec
- Added spec section references in phase_reversion.md, error_recovery.md,
  and plan_execute.md for field naming context
- Extended repository roundtrip test to assert all 11 threshold fields
- Fixed benchmark _make_profile() passing safety fields as top-level
  kwargs instead of via SafetyProfile sub-model (incompatible with
  extra="forbid")
- Aligned CLI JSON/YAML output structure for automation-profile show
  with the specification grouped format (phase_transitions,
  decision_automation, self_repair, execution_controls)
- Moved safety boolean fields into the Execution Controls section
  of Rich output per spec examples
- Reverted auto profile description to "Fully automatic except apply"
  per specification (line 16703, line 28406)
- Improved bridge comments in test steps with semantic context for
  threshold-to-gate mappings

ISSUES CLOSED: #902
2026-03-30 13:18:07 +01:00

175 lines
4.9 KiB
YAML

# Automation Profile YAML Schema
# Defines the expected structure for automation profile configuration files.
# See docs/specification.md Section "Automation Profiles" for full details.
type: object
required:
- name
additionalProperties: false
properties:
name:
type: string
minLength: 1
pattern: "^[a-zA-Z0-9_-]+(/[a-zA-Z0-9_-]+)?$"
description: >
Profile name: bare built-in name (e.g. 'manual')
or namespaced 'namespace/name' (e.g. 'acme/strict')
description:
type: string
description: "Human-readable description of the profile"
schema_version:
type: string
default: "1.0"
description: "Schema version for forward compatibility"
# Task-type confidence thresholds (0.0 = auto, 1.0 = human)
decompose_task:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic task decomposition"
create_tool:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic tool creation"
select_tool:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic tool selection"
edit_code:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic code editing"
execute_command:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic command execution"
create_file:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic file creation"
delete_content:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic content deletion"
access_network:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic network access"
install_dependency:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic dependency installation"
modify_config:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic configuration modification"
approve_plan:
type: number
minimum: 0.0
maximum: 1.0
default: 0.0
description: "Threshold for automatic plan approval"
# Optional automation guards (runtime enforcement hooks)
guards:
type: ["object", "null"]
description: "Optional AutomationGuard sub-model with per-invocation runtime constraints"
properties:
max_tool_calls_per_step:
type: ["integer", "null"]
minimum: 0
default: null
description: "Maximum tool invocations per step before requiring approval"
max_total_cost:
type: ["number", "null"]
minimum: 0.0
default: null
description: "Maximum cumulative invocation cost before requiring approval"
tool_allowlist:
type: ["array", "null"]
items:
type: string
default: null
description: "Only these tools may proceed automatically (null = all tools)"
tool_denylist:
type: ["array", "null"]
items:
type: string
default: null
description: "These tools always require approval (null = no denied tools)"
require_approval_for_writes:
type: boolean
default: false
description: "Require approval for write operations"
require_approval_for_apply:
type: boolean
default: false
description: "Require approval before apply phase"
# Safety profile (composed sub-model)
safety:
type: object
description: "Composed SafetyProfile sub-model with hard safety constraints"
properties:
require_sandbox:
type: boolean
default: true
description: "Whether a sandbox is required for execution"
require_checkpoints:
type: boolean
default: true
description: "Whether checkpoints are required"
allow_unsafe_tools:
type: boolean
default: false
description: "Whether unsafe tools may be used"
require_human_approval:
type: boolean
default: false
description: "Whether human approval is required before each action step"
allowed_skill_categories:
type: array
items:
type: string
default: []
description: "Skill categories permitted for execution (empty = all allowed)"
max_cost_per_plan:
type: ["number", "null"]
minimum: 0.0
default: null
description: "Maximum cost in USD per plan execution (null = no limit)"
max_total_cost:
type: ["number", "null"]
minimum: 0.0
default: null
description: "Maximum total cost in USD across all plans (null = no limit)"
max_retries_per_step:
type: integer
minimum: 0
maximum: 100
default: 3
description: "Maximum retry attempts per action step"