---
ace_runtime_version: "1.0.0"
runtime:
  mode: "interactive"
  profile_name: "default"
workspace:
  root: ".ace/workspaces"
  retention: "delete"
  hooks:
    after_create: null
    before_run: null
    after_run: null
    before_remove: null
executor:
  command: null
  approval_policy: "on-request"
  thread_sandbox: "workspace-write"
  turn_sandbox_policy: null
  max_turns: 6
  turn_timeout_ms: 300000
tools:
  registry_path: "agent-state/runtime-tool-specs.json"
autonomy:
  orchestrator_preflight: true
  recall_context: true
  state_sources: ["agent-state/TASK.md", "agent-state/SCOPE.md", "agent-state/QUALITY_GATES.md", "agent-state/STATUS.md", "agent-state/HANDOFF.json", "agent-state/EVIDENCE_LOG.md"]
  before_run_checks: []
  stop_checks: []
  review_mode: null
continuity:
  enabled: true
  source_paths: ["agent-state/TASK.md", "agent-state/SCOPE.md", "agent-state/QUALITY_GATES.md", "agent-state/HANDOFF.json", "agent-state/STATUS.md", "agent-state/DECISIONS.md", "agent-state/RISKS.md", "agent-state/EVIDENCE_LOG.md"]
  max_sources: 6
  max_excerpt_chars: 450
  max_total_chars: 2600
  max_status_events: 6
  max_run_ledger_entries: 4
  include_snapshot: true
tracker:
  kind: "none"
  config: {}
observability:
  http_enabled: false
  http_port: null
  vericify_bridge:
    enabled: false
    bridge_path: "agent-state/vericify/ace-bridge.json"
    process_post_path: "agent-state/vericify/process-posts.json"
---
# ACE Runtime Prompt Template

Operate under ACE runtime profile `{{runtime.profile_name}}` in `{{runtime.mode}}` mode.

## Runtime Intent
- Use this profile for ACE execution that must stay aligned to file-backed state and managed workspace policy.
- Treat front matter as execution policy. If a field is `null`, `false`, or empty, do not invent extra runtime machinery.
- Preserve objective, boundary, evidence, and transition truth inside ACE artifacts rather than chat-local memory.

## Task
{{task}}

## Workspace
- Managed root: `{{workspace.root}}`
- Retention: `{{workspace.retention}}`

## Executor
- Command: `{{executor.command}}`
- Approval policy: `{{executor.approval_policy}}`
- Thread sandbox: `{{executor.thread_sandbox}}`
- Max turns: `{{executor.max_turns}}`
- Turn timeout ms: `{{executor.turn_timeout_ms}}`

## Runtime Tools
- Registry: `{{tools.registry_path}}`

## Autonomy
- Orchestrator preflight: `{{autonomy.orchestrator_preflight}}`
- Recall context: `{{autonomy.recall_context}}`
- State sources: `{{autonomy.state_sources}}`
- Before-run checks: `{{autonomy.before_run_checks}}`
- Stop checks: `{{autonomy.stop_checks}}`
- Review mode: `{{autonomy.review_mode}}`

## Autonomy Guidance
- `orchestrator_preflight` means validate ACE truth before substantial work or delegation.
- `recall_context` means prefer current task, status, handoff, and evidence state over stale thread assumptions.
- `before_run_checks` are blocking checks. If they fail, stop and surface the failure through ACE evidence and status channels.
- `stop_checks` are terminal or handoff checks. If they fail, do not continue optimistically.
- `review_mode` must stay inside existing ACE tools and artifacts; it is an overlay, not a second subsystem.

## Continuity
- Enabled: `{{continuity.enabled}}`
- Source paths: `{{continuity.source_paths}}`
- Max sources: `{{continuity.max_sources}}`
- Max excerpt chars: `{{continuity.max_excerpt_chars}}`
- Max total chars: `{{continuity.max_total_chars}}`
- Max status events: `{{continuity.max_status_events}}`
- Max run-ledger entries: `{{continuity.max_run_ledger_entries}}`
- Include snapshot: `{{continuity.include_snapshot}}`

## Continuity Guidance
- Continuity packets are derived from current ACE truth; they are not a replacement source of truth.
- Treat the configured budgets as source-side compaction rules for unattended execution and delegation, including recent status and run-ledger visibility.
- If continuity is disabled, do not synthesize a replacement packet in chat or hidden state.

## ACE Recall
{{ace_state_recall_md}}

## Context Snapshot
{{ace_context_snapshot_md}}

## Continuity Packet
{{ace_continuity_packet_md}}

## Tracker
- Kind: `{{tracker.kind}}`

## Sidecars
- Vericify bridge enabled: `{{observability.vericify_bridge.enabled}}`
- Vericify bridge path: `{{observability.vericify_bridge.bridge_path}}`
- Vericify process-post path: `{{observability.vericify_bridge.process_post_path}}`

## Notes
- Preserve ACE state artifacts as the durable source of truth.
- Treat Vericify as an optional sidecar, not a required ACE runtime dependency.
- Treat this template as additive execution guidance for future unattended flows.

## Failure Handling
- When the task contract, evidence, or hooks are contradictory, prefer hold/escalation over optimistic continuation.
- Record blockers in ACE artifacts with owners and evidence refs before handing off or stopping.
- If the profile is missing capabilities, keep the gap explicit rather than silently broadening the runtime contract.
