- Status: accepted
- Date: 2026-02-18
- Updated: 2026-02-20
Recurgent's early tool evolution behavior relied heavily on prompt policy and implicit heuristics. That produced useful behavior, but promotion/reuse decisions were not consistently represented as auditable runtime data.
This ADR established a control plane for automatic shaping/evolution that keeps solver cognition flexible while making promotion policy explicit.
Since drafting, MVP infrastructure has been implemented and validated across phased rollout work documented in docs/reports/adr-0023-phase-validation-report.md.
Adopt a first-class solver/evolution evidence model with reliability-gated lifecycle transitions.
Each dynamic call captures solver_shape with stable fields:
stancecapability_summaryreuse_basiscontract_intentpromotion_intent
Capture is observational and does not directly mutate domain semantics.
Tool artifacts transition through:
candidateprobationdurabledegraded
State is tracked per artifact checksum/version, not just per tool name.
Current implemented policy contract (solver_promotion_v1) gates probation -> durable using:
- minimum observation window:
min_calls: 10,min_sessions: 2 min_contract_pass_rate: 0.95max_guardrail_retry_exhausted: 0max_outcome_retry_exhausted: 0max_wrong_boundary_count: 0max_provenance_violations: 0min_state_key_consistency_ratio: 0.5- if role-profile observations exist:
min_role_profile_pass_rate: 0.99
Runtime flags:
solver_shape_capture_enabledpromotion_shadow_mode_enabledpromotion_enforcement_enabled
Shadow decisions are always logged when shadow mode is enabled. Enforcement controls selection behavior.
- selector prefers non-degraded versions in order: durable -> probation -> candidate
<known_tools>prompt rendering includes lifecycle/policy/reliability hints- ranking biases durable up and degraded down
Operator tooling and docs support scorecard inspection, decision inspection, and audited manual lifecycle overrides.
- ADR 0023 measures reliability and lifecycle fitness.
- ADR 0024 adds semantic continuity/correctness pressure for role-style interfaces.
- ADR 0025 governs awareness and authority boundaries for evolution actions.
Delivered in Ruby runtime and docs:
- solver-shape capture and observability fields
- version-scoped scorecards and lifecycle metadata persistence
- promotion shadow engine with policy versioning and rationale logging
- enforcement-capable selector path with kill-switch
- lifecycle-aware known-tool ranking/prompt hints
- operator command surfaces for scorecards/decisions/lifecycle overrides
- rollout/maintenance/governance documentation
Primary implementation and evidence references:
runtimes/ruby/lib/recurgent/call_state.rbruntimes/ruby/lib/recurgent/artifact_selector.rbruntimes/ruby/lib/recurgent/tool_store.rbruntimes/ruby/lib/recurgent/known_tool_ranker.rbdocs/reports/adr-0023-phase-validation-report.md
Not fully implemented yet:
- computed
false_promotion/false_holdclassification pipeline (ledger counters exist, automated classification loop is not complete) - capability-class threshold specialization engine (global defaults remain active)
- domain-capability hardening (for example movie listings quality) which is intentionally outside this ADR's policy scope
Baseline (pre-implementation phase 0, see report):
- Full test suite passed (
238 examples, 0 failures), but no solver-shape/lifecycle policy contract existed in runtime traces. - Calculator baseline scenario could be correct, but semantic quality drift was not encoded as lifecycle evidence.
- Assistant scenarios showed truthful failures (
capability_unavailable) for missing capabilities; no promotion policy lane existed to reason about evolving candidates.
- Solver-shape visibility improves from implicit prompt-only behavior to explicit per-call telemetry coverage (
solver_shape+ completeness fields). - Promotion decisions improve from opaque heuristics to explicit policy-versioned lifecycle decisions with rationale fields.
- Artifact reuse safety improves via version-aware lifecycle states and deterministic fallback preference order.
- Operational auditability improves via inspectable scorecards/decisions and explicit policy toggles.
- Runtime does not reinterpret domain
Outcome.okinto semantic error by heuristic judgment (ADR 0017 remains intact). - This ADR does not introduce domain-specific quality heuristics (news/movies/recipes correctness stays outside policy contract).
- This ADR does not grant autonomous policy mutation authority (ADR 0025 authority boundaries remain in force).
- Tests: full Ruby suite remains green during rollout phases.
- Traces/logs: presence and stability of
solver_shape*,lifecycle_*,promotion_*, and artifact-selection lifecycle fields. - Scorecard evidence: version-scoped counters and policy-version snapshots persist per artifact checksum.
- Observation window threshold for durable eligibility: at least 10 calls across at least 2 sessions.
- Promotion enforcement causes material regression in stable scenarios -> disable
promotion_enforcement_enabledand continue shadow-only calibration. - Candidate volatility causes repeated degradation churn -> tighten thresholds or hold at probation while collecting more evidence.
- A capability class shows sustained misfit (>2x false-hold/false-promotion vs global baseline once classification is available) -> introduce class-specific thresholds only for that class.
In scope:
- solver-shape contract and telemetry
- reliability-gated lifecycle policy for artifact versions
- selector/prompt integration with lifecycle evidence
- operational inspection and control surfaces
Out of scope:
- domain-specific semantic grading
- replacing delegated contract validation mechanisms
- autonomous runtime policy mutation
- Promotion and reuse policy are explicit, measurable, and auditable.
- Evolution decisions are traceable at the same granularity as runtime execution.
- Reliability and semantic-correctness layers remain separable and composable.
- Additional metadata and policy complexity in runtime persistence surfaces.
- More operational discipline needed for threshold tuning and rollout governance.
- Reliability policy can surface semantic instability but does not solve it alone.
- Keep solver shape implicit in prompt text only.
- Rejected: weak auditability and weak policy determinism.
- Hard-code rigid planner behavior in runtime.
- Rejected: conflicts with Tool Builder autonomy and project tenets.
- Promote on first success.
- Rejected: insufficient reliability evidence and higher drift risk.
Rollout phases from this ADR are complete as MVP in Ruby runtime:
- schema and trace capture
- version-scoped scorecards
- shadow promotion engine
- controlled enforcement path
- prompt/selector integration
- operations/governance surfaces
Follow-up work continues under separate plans/ADRs for:
- semantic continuity contracts (ADR 0024)
- awareness/authority substrate evolution (ADR 0025)
- quality hardening of specific capability flows
- Promotion gates must not rewrite domain outcomes.
- Policy versions and lifecycle decisions must be logged and inspectable.
- Lifecycle transitions must be reversible via selector policy and operator controls.
- Reliability policy measures stability; semantic correctness requires complementary contracts (ADR 0024 when applicable).
No new UL terms introduced beyond those already adopted through ADR 0023/0024/0025 updates in docs/ubiquitous-language.md.