Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions config/code_review.runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,63 @@ mcp:
paths:
skills_dir: examples/code_review/skills
incidents_dir: code_reviews
# Phase 8 (DECOUPLE-05 + DECOUPLE-07): full terminal-tool registry +
# state-overrides schema for code_review. Three rules dispatch
# ``set_recommendation`` by ``args.recommendation`` (approve ->
# approved; request_changes -> changes_requested; comment -> commented).
# When no rule fires the session falls through to ``unreviewed``
# (the v1.0 framework-default failure mode).
orchestrator:
entry_agent: intake
default_terminal_status: unreviewed
statuses:
in_review:
name: in_review
terminal: false
kind: pending
approved:
name: approved
terminal: true
kind: success
changes_requested:
name: changes_requested
terminal: true
kind: failure
commented:
name: commented
terminal: true
kind: needs_review
unreviewed:
name: unreviewed
terminal: true
kind: needs_review
terminal_tools:
- tool_name: set_recommendation
status: approved
match_args:
recommendation: approve
- tool_name: set_recommendation
status: changes_requested
match_args:
recommendation: request_changes
- tool_name: set_recommendation
status: commented
match_args:
recommendation: comment
# App-MCP-server discovery (Phase 7 / DECOUPLE-04 / D-07-02). Empty
# list = code-review boots without app-owned MCP servers; framework
# treats the empty branch gracefully.
mcp_servers: []
# DECOUPLE-05 / D-08-01: app-declared pydantic schema for
# state_overrides; orchestrator validates start_session's
# state_overrides kwarg against this class.
state_overrides_schema: examples.code_review.state.CodeReviewStateOverrides
# Cross-cutting framework knobs read directly off AppConfig.framework.
framework:
# Per-app session-id prefix. Threaded through SessionStore into
# Session.id_format so this app's rows look like REVIEW-YYYYMMDD-NNN
# — disjoint from the incident-management ``INC-`` namespace.
session_id_prefix: REVIEW
confidence_threshold: 0.7
similarity_threshold: 0.3
escalation_teams: []
Expand Down
70 changes: 65 additions & 5 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ mcp:
category: incident_management
- name: local_observability
transport: in_process
module: runtime.mcp_servers.observability
module: examples.incident_management.mcp_servers.observability
category: observability
- name: local_remediation
transport: in_process
module: runtime.mcp_servers.remediation
module: examples.incident_management.mcp_servers.remediation
category: remediation
- name: local_user_context
transport: in_process
module: runtime.mcp_servers.user_context
module: examples.incident_management.mcp_servers.user_context
category: user_context
- name: external_ticketing
transport: http
Expand All @@ -73,6 +73,9 @@ paths:
# ``config/incident_management.yaml`` carries — kept here so the
# bundled deployment config is self-contained.
framework:
# Per-app session-id prefix. Threaded through SessionStore into
# Session.id_format so this app's rows look like INC-YYYYMMDD-NNN.
session_id_prefix: INC
confidence_threshold: 0.75
similarity_threshold: 0.2
escalation_teams:
Expand Down Expand Up @@ -124,8 +127,65 @@ dedup:
same_environment: true
only_closed: true

# orchestrator: omitted — framework defaults apply (entry_agent='intake').
# Override here only if you want to point the entry at a different skill.
# Generic terminal-tool registry. Apps declare which tool calls
# transition the session to which status, plus optional per-rule
# extra-field extraction. Replaces the v1.0 hardcoded
# ``_TERMINAL_TOOL_RULES`` table in ``orchestrator.py`` (Phase 6 /
# DECOUPLE-02 / DECOUPLE-03 / D-06-01..06). Mirrors
# ``incident_management.yaml`` since this is the bundled deployment
# config for the example app.
orchestrator:
entry_agent: intake
default_terminal_status: needs_review
statuses:
open:
name: open
terminal: false
kind: pending
escalated:
name: escalated
terminal: true
kind: escalation
resolved:
name: resolved
terminal: true
kind: success
needs_review:
name: needs_review
terminal: true
kind: needs_review
terminal_tools:
- tool_name: mark_resolved
status: resolved
- tool_name: mark_escalated
status: escalated
extract_fields:
team:
- args.team
- result.team
- tool_name: notify_oncall
status: escalated
extract_fields:
team:
- args.team
patch_tools:
- update_incident
harvest_terminal_tools:
- submit_hypothesis
# App-MCP-server discovery (Phase 7 / DECOUPLE-04 / D-07-02). Each
# entry is a dotted module path imported at orchestrator boot; each
# module exposes ``register(mcp_app, cfg)``. Replaces the v1.0
# hardcoded framework-internal MCP-server imports + setter calls.
mcp_servers:
- examples.incident_management.mcp_servers.observability
- examples.incident_management.mcp_servers.remediation
- examples.incident_management.mcp_servers.user_context
escalate_action_tool_name: notify_oncall
escalate_action_default_team: platform-oncall
# DECOUPLE-05 / D-08-01: app-declared pydantic schema for
# state_overrides; orchestrator validates the start_session
# kwarg against this class.
state_overrides_schema: examples.incident_management.state.IncidentStateOverrides
runtime:
# Wires the orchestrator and storage layer to the incident-management
# domain state class (see examples/incident_management/state.py).
Expand Down
53 changes: 50 additions & 3 deletions config/config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ mcp:
category: incident_management
- name: local_observability
transport: in_process
module: runtime.mcp_servers.observability
module: examples.incident_management.mcp_servers.observability
category: observability
- name: local_remediation
transport: in_process
module: runtime.mcp_servers.remediation
module: examples.incident_management.mcp_servers.remediation
category: remediation
- name: local_user_context
transport: in_process
module: runtime.mcp_servers.user_context
module: examples.incident_management.mcp_servers.user_context
category: user_context
# Example remote MCP — disabled by default
- name: external_ticketing
Expand All @@ -87,6 +87,53 @@ paths:
skills_dir: config/skills
incidents_dir: incidents

# Generic terminal-tool registry (Phase 6 / D-06-01..06).
orchestrator:
entry_agent: intake
default_terminal_status: needs_review
statuses:
open:
name: open
terminal: false
kind: pending
escalated:
name: escalated
terminal: true
kind: escalation
resolved:
name: resolved
terminal: true
kind: success
needs_review:
name: needs_review
terminal: true
kind: needs_review
terminal_tools:
- tool_name: mark_resolved
status: resolved
- tool_name: mark_escalated
status: escalated
extract_fields:
team:
- args.team
- result.team
- tool_name: notify_oncall
status: escalated
extract_fields:
team:
- args.team
patch_tools:
- update_incident
harvest_terminal_tools:
- submit_hypothesis
# App-MCP-server discovery (Phase 7 / DECOUPLE-04 / D-07-02).
mcp_servers:
- examples.incident_management.mcp_servers.observability
- examples.incident_management.mcp_servers.remediation
- examples.incident_management.mcp_servers.user_context
escalate_action_tool_name: notify_oncall
escalate_action_default_team: platform-oncall

intervention:
# If the deep_investigator's reported confidence is below this threshold, the
# graph pauses and surfaces an intervention prompt to the UI.
Expand Down
68 changes: 68 additions & 0 deletions config/incident_management.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,76 @@
store_path: incidents
similarity_method: keyword

# Generic terminal-tool registry. Apps declare which tool calls
# transition the session to which status, plus optional per-rule
# extra-field extraction. Replaces the v1.0 hardcoded
# ``_TERMINAL_TOOL_RULES`` table in ``orchestrator.py`` (Phase 6 /
# DECOUPLE-02 / DECOUPLE-03 / D-06-01..06).
orchestrator:
entry_agent: intake
default_terminal_status: needs_review
statuses:
open:
name: open
terminal: false
kind: pending
escalated:
name: escalated
terminal: true
kind: escalation
resolved:
name: resolved
terminal: true
kind: success
needs_review:
name: needs_review
terminal: true
kind: needs_review
terminal_tools:
- tool_name: mark_resolved
status: resolved
- tool_name: mark_escalated
status: escalated
extract_fields:
team:
- args.team
- result.team
- tool_name: notify_oncall
status: escalated
extract_fields:
team:
- args.team
# Tools whose ``args.patch`` blob the harvester folds into agent
# confidence/signal/rationale (DECOUPLE-02 generalization).
patch_tools:
- update_incident
# Tools the harvester treats as typed-terminal for confidence
# capture but the orchestrator's finalize path does NOT transition
# status on (the deep_investigator's hypothesis tool is a stage-
# complete signal, not a session-end signal).
harvest_terminal_tools:
- submit_hypothesis
# App-MCP-server discovery (Phase 7 / DECOUPLE-04 / D-07-02). Each
# entry is a dotted module path imported at orchestrator boot; each
# module exposes ``register(mcp_app, cfg)``. Replaces the v1.0
# hardcoded framework-internal MCP-server imports + setter calls.
mcp_servers:
- examples.incident_management.mcp_servers.observability
- examples.incident_management.mcp_servers.remediation
- examples.incident_management.mcp_servers.user_context
# Parameterized escalate path (Resolution A — Option B).
escalate_action_tool_name: notify_oncall
escalate_action_default_team: platform-oncall
# DECOUPLE-05 / D-08-01: app-declared pydantic schema for
# state_overrides; orchestrator validates the start_session
# kwarg against this class.
state_overrides_schema: examples.incident_management.state.IncidentStateOverrides

# Cross-cutting framework knobs the runtime consumes directly.
framework:
# Per-app session-id prefix. Threaded through SessionStore into
# Session.id_format so this app's rows look like INC-YYYYMMDD-NNN.
session_id_prefix: INC
confidence_threshold: 0.75
similarity_threshold: 0.2
escalation_teams:
Expand Down
Loading
Loading