- Date: 2026-02-19
- Scope:
docs/plans/solver-shape-reliability-gated-tool-evolution-implementation-plan.md - Required checks per phase:
- Full Ruby test suite (
bundle exec rspec) - Calculator example (
runtimes/ruby/examples/calculator.rb) - Assistant example (
runtimes/ruby/examples/assistant.rb) with three requests:- What's the top news items in Google News, Yahoo! News, and NY Times
- What's are the action adventure movies playing in theaters
- What's a good recipe for Jaffna Kool
- Log inspection and diagnosis for calculator + assistant runs
- Full Ruby test suite (
- Added ADR and plan documents for solver-shape and reliability-gated tool evolution.
- Updated documentation indexes.
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-0/xdg bundle exec rspec - Result: PASS
- Evidence:
tmp/phase-validation/phase-0/rspec.txt - Summary:
238 examples, 0 failures
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-0/xdg ruby examples/calculator.rb - Result: PASS
- Evidence:
tmp/phase-validation/phase-0/calculator.txt - Output checks:
add(3) => 8multiply(4) => 32sqrt(32) => 5.656854249492381sqrt(144) => 12.0factorial(10) => 3628800convert(100, celsius->fahrenheit) => 212.0solve('2x + 5 = 17') => x = 6.0
- Accuracy assessment: Correct for all numeric operations shown.
- Command:
cd runtimes/ruby && printf ... | XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-0/xdg ruby examples/assistant.rb - Result: PARTIAL
- Evidence:
tmp/phase-validation/phase-0/assistant.txt - Request 1 (top news from Google/Yahoo/NYT):
- Returned 15 items (5 per source) with provenance entries for all 3 source feeds.
- Accuracy: Structurally correct with source coverage and provenance present.
- Request 2 (action adventure movies in theaters):
- Returned typed error:
capability_unavailable. - Accuracy: Not meeting user request content, but truthful failure (no fabricated listings).
- Returned typed error:
- Request 3 (Jaffna Kool recipe):
- Returned detailed structured recipe payload with ingredients/instructions.
- Accuracy: Plausible and useful recipe response.
- Log file:
tmp/phase-validation/phase-0/xdg/recurgent/recurgent.jsonl(18entries) - Calculator trace (8 entries, all
ok, depth0):- Methods executed:
add,multiply,sqrt,sqrt,factorial,convert,solve,history - Program source: all
generated, no retries/exhaustion events.
- Methods executed:
- Assistant trace (3 top-level
askentries):- Call 1 (
ok): delegated tohttp_fetcher.fetch_urlandrss_parser.parse(3 fetch + 3 parse calls; first generated then persisted artifact reuse). - Call 2 (
error):capability_unavailablewith explicit message about missing live movie/showtime capability. - Call 3 (
ok): recipe response generated directly.
- Call 1 (
- Diagnosis:
- What went well:
- Provenance-backed news aggregation succeeded and reused delegated artifacts within the session.
- Calculator baseline behavior remains stable and correct.
- Failure posture is honest (
capability_unavailable) instead of hallucinated movie data.
- Needs improvement:
- Movie listings flow needs a tolerant fallback path (for example, currently-playing action/adventure discovery via available web/RSS sources) instead of hard failure.
- What went well:
- Implemented observational solver-shape capture in call state:
solver_shapefields:stance,capability_summary,reuse_basis,contract_intent,promotion_intentsolver_shape_completeboolean guardrail for required gate fields
- Wired solver-shape fields into JSONL observability:
solver_shapesolver_shape_completesolver_shape_stancesolver_shape_promotion_intent
- Added logging spec coverage for new solver-shape fields.
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-1/xdg bundle exec rspec - Result: PASS
- Evidence:
tmp/phase-validation/phase-1/rspec.txt - Summary:
238 examples, 0 failures
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-1/xdg ruby examples/calculator.rb - Result: PARTIAL
- Evidence:
tmp/phase-validation/phase-1/calculator.txt - Output checks:
add(3) => 3multiply(4) => 12sqrt(12) => 3.4641016151377544sqrt(144) => 12.0factorial(10) => 3628800convert(100, celsius->fahrenheit) => 212.0solve('2x + 5 = 17') => x = 6.0
- Accuracy assessment:
- Arithmetic chain semantics regressed for
add/multiplyrelative to expected memory-based behavior. - Remaining calculations were accurate.
- Arithmetic chain semantics regressed for
- Command:
cd runtimes/ruby && printf ... | XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-1/xdg ruby examples/assistant.rb - Result: PARTIAL
- Evidence:
tmp/phase-validation/phase-1/assistant.txt - Request 1 (top news):
- Returned multi-source payload with Google/Yahoo/NYT and provenance.
- Accuracy: Good overall source coverage and structure.
- Request 2 (action-adventure movies in theaters):
- Returned
capability_unavailable. - Accuracy: Truthful failure, but missing requested listings.
- Returned
- Request 3 (Jaffna Kool recipe):
- Returned structured recipe details.
- Accuracy: Useful and plausible.
- Log file:
tmp/phase-validation/phase-1/xdg/recurgent/recurgent.jsonl(18entries) - Solver-shape telemetry verification:
solver_shapepresent on all 18 entries.solver_shape_complete=trueon all 18 entries.- Top-level calculator calls logged
stance=shape,promotion_intent=local_pattern. - Top-level assistant calls logged
stance=forge,promotion_intent=durable_tool_candidate.
- Execution trace highlights:
- Calculator: 8 top-level calls + 1 delegated
calculator_tool.sqrt. - Assistant news flow attempted
http_fetcher.fetch_url(3 failures: guardrail/provenance), then succeeded withrss_news_fetcher.fetch(generated then persisted reuse).
- Calculator: 8 top-level calls + 1 delegated
- Diagnosis:
- What went well:
- Solver-shape observational fields were captured consistently with no test regressions.
- Assistant recovered from one delegate lane to a working fallback lane for news.
- Needs improvement:
- Calculator behavior variability indicates weak contract anchoring for additive/multiplicative state semantics.
- News flow still shows upstream tool-quality instability (guardrail/provenance failures before successful fallback).
- What went well:
- Added version-scoped artifact scorecards (
artifact["scorecards"][checksum]) with:- calls/successes/failures
- contract pass/fail counters
- guardrail/outcome exhaustion counters
- wrong-boundary and provenance-violation counters
- short/medium rolling windows
- session tracking
state_key_consistency_ratio
- Added registry metadata enrichment in
ToolStore:method_state_keysstate_key_consistency_ratioversion_scorecardskeyed bymethod@artifact_checksum
- Added helper accessors for artifact scorecards and extended specs for scorecard/coherence persistence.
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-2/xdg bundle exec rspec - Result: PASS
- Evidence:
tmp/phase-validation/phase-2/rspec.txt - Summary:
239 examples, 0 failures
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-2/xdg ruby examples/calculator.rb - Result: PARTIAL
- Evidence:
tmp/phase-validation/phase-2/calculator.txt - Output checks:
add(3) => 8,multiply(4) => 32,sqrt(32) => 5.656854249492381sqrt(144) => 12.0,factorial(10) => 3628800,convert(...) => 212.0solve('2x + 5 = 17') => { error_type: \"parse_error\", ... }
- Accuracy assessment:
- Core arithmetic path mostly correct.
- Equation-solving path regressed to parse error, so example is not fully correct.
- Command:
cd runtimes/ruby && printf ... | XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-2/xdg ruby examples/assistant.rb - Result: PARTIAL
- Evidence:
tmp/phase-validation/phase-2/assistant.txt - Request 1 (top news):
- Returned 15 items across Google News / Yahoo! / NYT with provenance.
- Accuracy: Good source and item coverage.
- Request 2 (action-adventure movies):
- Returned
capability_unavailable. - Accuracy: truthful failure, but no requested listings.
- Returned
- Request 3 (Jaffna Kool recipe):
- Returned detailed markdown recipe.
- Accuracy: useful, plausible answer.
- Log file:
tmp/phase-validation/phase-2/xdg/recurgent/recurgent.jsonl(17entries) - Solver-shape telemetry remains complete:
solver_shapepresent on all entries.solver_shape_complete=trueon all entries.
- Trace summary:
- Calculator: 8 top-level calls, all logged
ok(including solve, which returned an error payload inside success envelope). - Assistant: 3 top-level
askcalls (ok,capability_unavailable,ok). - News flow delegated through
rss_feed_fetcherandrss_feed_parser.
- Calculator: 8 top-level calls, all logged
- Scorecard evidence:
- Artifact version scorecard persisted (example: calculator
solveartifact has one checksum entry withcalls=1, successes=1, failures=0). - Registry-level version scorecards and coherence fields persisted for delegated tools (for example
rss_feed_fetcher,rss_feed_parser).
- Artifact version scorecard persisted (example: calculator
- Diagnosis:
- What went well:
- Version-scoped scorecards and coherence metadata are being written without breaking existing metrics/tests.
- Observational solver-shape and prior behavior surfaces are intact.
- Needs improvement:
- Calculator
solvesemantic quality is still unstable and can hide errors inside success outcomes. - Movie-listings request still lacks a tolerant fallback implementation path.
- Calculator
- What went well:
- Added promotion policy contract
solver_promotion_v1with shadow-only lifecycle evaluation. - Implemented shadow lifecycle state machine persisted per artifact version:
candidate -> probation -> durable- regression path to
degraded
- Added lifecycle + decision ledger persistence on artifacts:
artifact["lifecycle"]["versions"][checksum]artifact["lifecycle"]["shadow_ledger"]["evaluations"]
- Added observability fields for policy/lifecycle decisions:
promotion_policy_versionlifecycle_statelifecycle_decisionpromotion_decision_rationalepromotion_shadow_modepromotion_enforced
- Added runtime config flags:
solver_shape_capture_enabledpromotion_shadow_mode_enabledpromotion_enforcement_enabled
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-3/xdg bundle exec rspec - Result: PASS
- Evidence:
tmp/phase-validation/phase-3/rspec.txt - Summary:
241 examples, 0 failures
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-3/xdg ruby examples/calculator.rb - Result: PARTIAL
- Evidence:
tmp/phase-validation/phase-3/calculator.txt - Output checks:
add(3) => 8multiply(4) => 0(unexpected)sqrt(latest_result)errored with execution failure- Remaining calls (
sqrt(144),factorial,convert,solve) succeeded
- Accuracy assessment:
- Calculator chain is unstable in this run due multiply/sqrt regression.
- Command:
cd runtimes/ruby && printf ... | XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-3/xdg ruby examples/assistant.rb - Result: PARTIAL
- Evidence:
tmp/phase-validation/phase-3/assistant.txt - Request 1 (top news):
- Returned large payload, but Google News parse failed (
parse_failed) while Yahoo/NYT succeeded. - Accuracy: Partial; source completeness is degraded.
- Returned large payload, but Google News parse failed (
- Request 2 (action-adventure movies):
- Returned
capability_unavailable. - Accuracy: truthful failure, missing requested listings.
- Returned
- Request 3 (Jaffna Kool recipe):
- Returned structured recipe object.
- Accuracy: useful and plausible.
- Log file:
tmp/phase-validation/phase-3/xdg/recurgent/recurgent.jsonl(15entries) - Lifecycle telemetry verification:
lifecycle_statepresent on all 15 entries.- Decision values observed:
continue_probation,hold. promotion_shadow_mode=trueandpromotion_enforced=falsefor all observed calls.
- Shadow lifecycle artifact evidence:
- Assistant
askartifact stores 3 checksum versions with mixed states (candidateandprobation) and 3 shadow evaluations. - Calculator
sqrtartifact stores separate checksum versions withcandidate/holdandprobation/continue_probation.
- Assistant
- Diagnosis:
- What went well:
- Shadow engine is writing deterministic lifecycle/decision evidence without enforcing selector changes.
- Log contract now exposes policy version and rationale for each call.
- Needs improvement:
- Runtime quality remains volatile on calculator and news parsing paths; shadow data correctly captures unstable candidates but product behavior still varies.
- No promotions yet under v1 thresholds (expected with low observation windows).
- What went well:
- Added version payload storage under artifacts (
artifact["versions"][checksum]) for deterministic fallback to prior versions. - Implemented enforcement-aware persisted artifact selection (feature-flagged):
- selection order:
durable->probation->candidate - lifecycle-aware selection metadata surfaced in call state/log fields.
- selection order:
- Added kill-switch behavior via runtime config (
promotion_enforcement_enabled). - Added enforcement test coverage proving durable-over-probation selection when enforcement is enabled.
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-4/xdg bundle exec rspec - Result: PASS
- Evidence:
tmp/phase-validation/phase-4/rspec.txt - Summary:
242 examples, 0 failures
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-4/xdg ruby examples/calculator.rb - Result: PASS (for observed flow)
- Evidence:
tmp/phase-validation/phase-4/calculator.txt - Output checks:
add(3) => 8multiply(4) => 32sqrt(32) => 5.656854249492381sqrt(144) => 12.0factorial(10) => 3628800convert(100, celsius->fahrenheit) => 212.0solve('2x + 5 = 17') => solution 6.0
- Accuracy assessment: Correct for this run.
- Command:
cd runtimes/ruby && printf ... | XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-4/xdg ruby examples/assistant.rb - Result: PARTIAL
- Evidence:
tmp/phase-validation/phase-4/assistant.txt - Request 1 (top news):
- Returned 10 headlines from Google + NYT; Yahoo branch failed with URI parsing error.
- Accuracy: Partial source coverage only (requested 3 sources, returned 2 with explicit error).
- Request 2 (action-adventure movies):
- Returned movie list with
retrieval_mode: "fixture"provenance. - Accuracy: Structurally useful, but not real-time theater accuracy.
- Returned movie list with
- Request 3 (Jaffna Kool recipe):
- Returned detailed markdown recipe.
- Accuracy: Useful and plausible.
- Log file:
tmp/phase-validation/phase-4/xdg/recurgent/recurgent.jsonl(13entries) - Lifecycle/decision evidence:
- All logged top-level calls show lifecycle decisions (
continue_probation) withpromotion_shadow_mode=true. - Artifact selection metadata fields exist in schema but were empty this run (
artifact_hit=0), so enforcement path did not trigger in examples.
- All logged top-level calls show lifecycle decisions (
- Enforcement correctness evidence:
- Verified by passing spec: durable version selected over probation version when
promotion_enforcement_enabled=true, and pre-policy behavior when disabled.
- Verified by passing spec: durable version selected over probation version when
- Diagnosis:
- What went well:
- Enforcement machinery is implemented and test-verified with kill-switch support.
- No regressions in full automated test suite.
- Needs improvement:
- Example runs still highly variable in delegated tool quality.
- News aggregator robustness (Yahoo branch) and real-time movie listing capability need hardening.
- What went well:
- Propagated lifecycle/policy snapshots into registry metadata on tool usage updates.
- Extended known-tool ranking to prioritize lifecycle reliability:
- durable > probation > candidate > degraded
- degraded penalty in utility scoring.
- Extended
<known_tools>prompt rendering with compact reliability/lifecycle hints:lifecycle: <state> (policy: <version>)reliability: calls=..., success_rate=..., wrong_boundary=..., retries_exhausted=...caution:line for degraded tools.
- Added prompt-construction tests for lifecycle-priority ranking and rendered metadata hints.
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-5/xdg bundle exec rspec - Result: PASS
- Evidence:
tmp/phase-validation/phase-5/rspec.txt - Summary:
243 examples, 0 failures
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-5/xdg ruby examples/calculator.rb - Result: PASS
- Evidence:
tmp/phase-validation/phase-5/calculator.txt - Output checks:
add(3) => 8,multiply(4) => 32,sqrt(32) => 5.656854249492381sqrt(144) => 12.0,factorial(10) => 3628800,convert(...) => 212.0solve('2x + 5 = 17') => 6.0
- Accuracy assessment: Correct for this run.
- Command:
cd runtimes/ruby && printf ... | XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-5/xdg ruby examples/assistant.rb - Result: PARTIAL
- Evidence:
tmp/phase-validation/phase-5/assistant.txt - Request 1 (top news):
- Returned all 3 sources with 5 sampled headlines each and provenance.
- Accuracy: Good source coverage and structured output.
- Request 2 (action-adventure movies):
- Returned
capability_unavailable. - Accuracy: truthful failure, no real showtime listings.
- Returned
- Request 3 (Jaffna Kool recipe):
- Returned structured recipe/details.
- Accuracy: useful and plausible.
- Log file:
tmp/phase-validation/phase-5/xdg/recurgent/recurgent.jsonl(14entries) - Runtime trace:
- Roles observed:
calculator(8),rss_feed_reader(3), assistant (3). - Assistant statuses:
ok,capability_unavailable,ok.
- Roles observed:
- Prompt integration evidence:
- Assistant debug
system_promptcontains lifecycle/reliability lines:lifecycle: probation (policy: solver_promotion_v1)reliability: calls=1, success_rate=1.0, wrong_boundary=0, retries_exhausted=0
- Assistant debug
- Diagnosis:
- What went well:
- Lifecycle-aware known-tools rendering and ranking are active and test-covered.
- Prompt footprint remained compact while adding reliability cues.
- Needs improvement:
- Movie-listings capability still unresolved in runtime tooling.
- Lifecycle data in this run remained mostly
probation/candidate, so durable preference could not be observed in real example flow.
- What went well:
- Added operations/governance documentation for lifecycle migration, tuning, rollback, and policy-version governance:
- Extended operator command surface in
bin/recurgent-tools:scorecards <role> <method>decisions <role> <method>set-lifecycle <role> <method> <checksum> <state> [--reason ...] [--apply]
- Added audited manual override persistence via
lifecycle.manual_overrides. - Added legacy lifecycle migration mode:
- existing pre-lifecycle artifacts initialize with
legacy_compatibility_mode=true - compatibility entries start in
probationfor policy re-qualification.
- existing pre-lifecycle artifacts initialize with
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-6/xdg bundle exec rspec - Result: PASS
- Evidence:
tmp/phase-validation/phase-6/rspec.txt - Summary:
243 examples, 0 failures
- Command:
cd runtimes/ruby && XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-6/xdg ruby examples/calculator.rb - Result: PASS
- Evidence:
tmp/phase-validation/phase-6/calculator.txt - Output checks:
add(3) => 8,multiply(4) => 32,sqrt(32) => 5.656854249492381sqrt(144) => 12.0,factorial(10) => 3628800convert(...) => { result: 212.0 }solve('2x + 5 = 17') => 6.0
- Accuracy assessment: Correct for this run.
- Command:
cd runtimes/ruby && printf ... | XDG_STATE_HOME=/Users/kulesh/dev/actuator/tmp/phase-validation/phase-6/xdg ruby examples/assistant.rb - Result: PARTIAL
- Evidence:
tmp/phase-validation/phase-6/assistant.txt - Request 1 (top news):
- Returned all three requested sources with concrete headline lists and provenance.
- Accuracy: Good source coverage.
- Request 2 (action-adventure movies):
- Returned
capability_unavailable("Execution failed"). - Accuracy: Failure acknowledged, but request not fulfilled.
- Returned
- Request 3 (Jaffna Kool recipe):
- Returned structured recipe payload.
- Accuracy: useful and plausible.
- Log file:
tmp/phase-validation/phase-6/xdg/recurgent/recurgent.jsonl(15entries) - Trace summary:
- Roles:
calculator(8), assistant (3),stable_finance_tool(3),movie_listings(1). - Assistant statuses:
ok,capability_unavailable,ok.
- Roles:
- Operator command verification:
bin/recurgent-tools scorecards "personal assistant that remembers conversation history" "ask" --root <phase-6 tools root>succeeded and returned version-scoped scorecards.bin/recurgent-tools decisions ... --limit 5succeeded and returned shadow decision rationale entries.- Evidence files:
- Diagnosis:
- What went well:
- Final lifecycle operations/governance surfaces are documented and executable.
- Operator inspection tools return the expected scorecard/decision data.
- Needs improvement:
- Assistant movie-listings pathway remains unreliable and frequently unfulfilled.
- Candidate-quality variability remains the dominant product risk despite improved policy/introspection controls.
- What went well: