Implemented Robot Framework E2E test suite validating Specification Workflow Example 7 (CI/CD Integration). Tests exercise the real CleverAgents CLI with zero mocking, covering: - ci-profile configuration with JSON output format and WARN log level (spec Step 1) - Idempotent resource and project registration with resource linking, verified via strict occurrence-count assertions - Three-validation registration (lint, typecheck, tests) with project attachment and tool-list verification - CI plan launch with action args (pr_branch, base_branch), explicit plan execute for lifecycle progression, and terminal-state assertion - JSON output verification via json.loads() with raw_decode fallback for mixed log/JSON CLI output - Graceful degradation via Skip If No LLM Keys when API keys are unavailable Resource/project naming follows spec convention (local/ci-workspace project, local/ci-main resource). Entity creation commands tolerate "already exists" for CI re-runnability. Config assertions use stdout-only matching and exact equality. Validation naming aligned with spec (local/ci-lint per §Example 7, line 39130). Added robot/common_vars.py module placeholder for shared Robot Framework variables. ISSUES CLOSED: #753
83 KiB
Changelog
Unreleased
-
Added TDD bug-capture tests for bug #1076 —
use_action()does not propagateautomation_profileto Plan. Three Behave BDD scenarios (@tdd_bug @tdd_bug_1076 @tdd_expected_fail) verify the full precedence chain (action, project-scoped config, global default) for automation profile resolution atplan usetime. Tests prove the bug exists: the Plan'sautomation_profileis alwaysNoneregardless of the Action's profile, project config, or global default. The@tdd_expected_failtag inverts this to a CI pass until the fix is merged. (#1098) -
Added TDD bug-capture tests for bug #1022 — InvariantService in-memory storage only. Four Behave BDD scenarios and three Robot Framework integration tests verify invariant persistence across simulated CLI process restarts. Tests use
@tdd_expected_failuntil bug #1022 is fixed. (#1032) -
Added TDD bug-capture test for bug #988 — ReactiveEventBus.emit() swallows exception details. Behave BDD scenario (
@tdd_bug @tdd_bug_988 @tdd_expected_fail) captures the missing exception message and traceback in the emit() exception handler. The test subscribes a handler that raises ValueError with a distinctive message and asserts the message appears in the structlog warning log — which currently fails, confirming the bug. The@tdd_expected_failtag inverts this to a CI pass until the fix is merged. (#1093) -
Added TDD bug-capture E2E tests for bug #1028 — ACMS indexing pipeline not wired into CLI. Four Robot Framework E2E tests prove ContextTierService starts empty on every CLI invocation. Tests use
@tdd_expected_failuntil the bug fix is merged. (#1029) -
Added Fix-then-Revalidate orchestration loop for required validations: bounded retry with configurable limits (0--100 per Safety Profile), strategy revision escalation via
auto_strategy_revisionfloat threshold, user escalation vianeeds_user_escalationresult flag, and domain events (VALIDATION_FIX_ATTEMPTED,VALIDATION_FIX_SUCCEEDED,VALIDATION_FIX_EXHAUSTED). Validation errors are treated as required failures regardless of mode. Includesauto_validation_fixthreshold, per-resource retry tracking, early-exit signalling viaNonereturn fromFixCallback, event bus circuit breaker with lock-protected failure counter, spec-requiredvalidation_summaryandfinal_validation_resultsfields on the result model, DI container registration per ADR-003, and structured logging viastructlog. (#583) -
Added LSP resource types:
executable,lsp-server,lsp-workspace,lsp-documentwith parent/child hierarchy, auto-discovery rules, and handler references. Registered in bootstrap, with YAML configurations, Behave BDD tests (21 scenarios), and Robot integration tests (6 tests). (#832) -
Implemented functional LSP runtime replacing local-mode stubs with real LSP protocol support.
StdioTransportmanages server subprocesses via JSON-RPC over stdin/stdout.LspClientimplements initialize/shutdown/ diagnostics/completions.LspLifecycleManagerprovides reference-counted instances, health checks, and crash restart.LanguageDiscoveryimplements 4-layer detection (extension, shebang, UKO, project config). Includes 27 Behave BDD scenarios and 6 Robot integration tests. (#826) -
Added ResourceHandler CRUD and discovery methods: read, write, delete, list_children, diff, and discover_children. Frozen dataclass result types (Content, WriteResult, DeleteResult, DiffResult) added to the handler protocol. GitCheckoutHandler implements all six methods via git plumbing and filesystem operations. FsDirectoryHandler implements all six via pathlib/os/difflib. DevcontainerHandler implements read, write, and discover_children via
devcontainer exec. DatabaseResourceHandler inherits NotImplementedError stubs pending connection management. (#827) -
Implemented ACMS context tier runtime promotion/demotion/eviction: auto-promotion on access with configurable threshold (default: 5), time-based staleness enforcement (hot/warm TTL, default: 24h each), budget-based LRU eviction on hot-tier overflow, and tier transition event emission (TIER_PROMOTED, TIER_DEMOTED, TIER_EVICTED) via EventBus. Added
context_tier_promotion_threshold,context_tier_hot_ttl_hours, andcontext_tier_warm_ttl_hourssettings with DI wiring of event_bus into ContextTierService. Oversized fragments that exceed the entire hot-tier budget are now redirected to the warm tier with a TIER_DEMOTED event. Promotion to hot falls back to warm when the promoted fragment is evicted by budget enforcement. Event emission is best-effort; a failing event bus no longer breaks tier operations. AddedCLEVERAGENTS_CTX_HOT_HOURSenv var alias forcontext_tier_hot_ttl_hoursfor consistency with the warm-tier alias. Demotion now resetsaccess_countto zero so that demoted fragments must accumulate fresh accesses before re-promotion, preventing staleness enforcement from being immediately undone by a single access. (#821) -
Added byte-size budget enforcement for the ACMS context assembly pipeline.
enforce_size_budget()filters context fragments againstmax_file_size(per-fragment) andmax_total_size(cumulative) limits defined in aContextView. New domain modelsBudgetViolationandBudgetEnforcementResultprovide structured violation reporting. Pipeline integration inACMSPipeline.assemble()applies enforcement as a pre-filter when acontext_viewis provided. (#847) -
Aligned plan lifecycle model with specification: ERRORED is now terminal in
is_terminal, per-phase state validation enforces APPLIED/CONSTRAINED to APPLY-only and COMPLETE to STRATEGIZE/EXECUTE-only via model validator, COMPLETE docstring clarified as phase-level terminal. Added defensive coercion in database deserialization for legacy invalid phase/state combinations with warning-level logging. Fixed assignment ordering inexecute_plan()for consistency with phase-state validator. UpdatedPlanResumeServicedocstring to reflect ERRORED terminality. (#918) -
Fixed
shell=Truesubprocess usage incli_coverage_steps.pyby replacing withshlex.split()andshell=Falsefor defense-in-depth command injection prevention, consistent with the existing pattern incli_plan_context_commands_steps.py. (#734) -
Added ACMS Backend Abstraction Layer (BAL) protocol definitions and in-memory stub implementations. Defines
TextBackend,VectorBackend, andGraphBackendprotocols with frozen result dataclasses (TextResult,VectorResult,GraphResult). In-memory stubs (InMemoryTextBackend,InMemoryVectorBackend,InMemoryGraphBackend) validate arguments and return empty results for development and testing. Backends registered as configurable singletons in the DI container with provider selection viaoverride_providers(). Includes Behave BDD tests (35 scenarios), Robot Framework smoke tests, ASV benchmarks, and reference documentation. (#498) -
Added TDD bug-capture tests for #1024 — SQLite DB URL resolves to CWD instead of CLEVERAGENTS_HOME. Behave BDD scenarios (
@tdd_bug @tdd_bug_1024 @tdd_expected_fail) verify that the defaultdatabase_urlresolves insideCLEVERAGENTS_HOME, not the current working directory. Includes Robot Framework integration tests with a helper script exercising the same resolution path via subprocess. (#1034) -
Added volatile in-memory
audit_logtoReactiveEventBus— every emittedDomainEventis appended to a volatile in-memory log accessible via theaudit_logproperty (defensive copy). Emit ordering now follows the specification: RxPY stream push, then audit append, then handler dispatch. Reactive and logging event buses now isolate stream/handler failures so one subscriber cannot block audit recording or downstream subscribers. The reactive stream now returns a read-only observable view (preventing directon_next()bypass), andReactiveEventBussupports explicit in-memory retention controls viamax_audit_log_sizeandclear_audit_log(). Includes expanded Behave and Robot integration coverage, 5 ASV benchmark suites, andvulture_whitelist.pyentry. (#587) -
Breaking (CLI):
agents actor runnow takes positional<NAME>and<PROMPT>arguments, aligning the command signature with the specification. The previous--prompt/-poption is removed.--config/-cis preserved as an optional fallback that overrides registry-based name resolution (spec deviation documented in_resolve_actor.py). Shared resolution logic extracted to_resolve_actor.pywithyaml.safe_dump, early name validation, input sanitisation, resilientatexit-based temp file cleanup, and graceful error handling for missing actors, empty config data, and non-serialisable config blobs (without exposing serializer internals in user-facing errors). Comprehensive BDD and Robot Framework tests cover all resolution paths and edge cases. (#901) -
Added BuiltinAdapter class and MCP automatic resource slot creation. BuiltinAdapter wraps register_file_tools/register_git_tools/register_subplan_tool into a unified adapter interface. McpAdapter.infer_resource_slots() analyzes tool input schemas to detect file/directory/repository parameters. (#882)
-
Added large-project scaling performance tests with ASV benchmarks for context assembly, execution throughput, and project scaling. Includes Behave BDD scenarios (78 scenarios, 200 steps), Robot Framework tests, and baseline threshold fixtures. (#576)
-
Added overlay filesystem sandbox strategy with real OverlayFS support and userspace copy-tree fallback. Includes lifecycle management, diff computation, and sandbox factory registration. (#880)
-
Added CLI polish infrastructure: shared constants.py (exit codes, format constants), centralized errors.py (cli_error, cli_not_found, cli_warning), and completion command for shell tab-completion generation. (#861)
-
Added tool-level execution environment preferences with NONE, REQUIRED, PREFERRED, and SPECIFIC modes. ToolRunner routes tool execution based on preference mode with caller-override precedence. (#879)
-
Added TDD bug-capture tests for #969 —
plan correctexpectsdecision_idbut M3 acceptance test passesplan_id. Behave BDD scenarios (revert and append modes) and Robot Framework integration tests verify thatrequest_correctionis called with the root decision ID when a plan_id is given as the first positional argument. Tests use@tdd_expected_failuntil the bug fix is merged. Shared mock fixtures extracted tofeatures/mocks/tdd_plan_correct_plan_id_fixtures.py. (#979) -
Added TDD bug-capture tests for bug #968:
plan explainexpects a decision_id but the M3 acceptance test passes a plan_id. Two Behave BDD scenarios (@tdd_bug @tdd_bug_968 @tdd_expected_fail) verify the fixed behaviour —plan explain <plan_id>succeeds (rc=0) and displays decision details. Includes Robot Framework integration tests with a helper script exercising the same CLI path via subprocess, and step definitions following established patterns. (#978) -
Added TDD bug-capture tests for bug #967 —
plan executephase processing. Tests exercise the CLI orchestration layer via CliRunner (Behave) and replicated CLI logic (Robot) to verify thatplan executecorrectly handles plans in Strategize/QUEUED state by runningrun_strategize()before transitioning. Includes four Behave scenarios and four Robot integration test cases covering CLI execute from QUEUED, full lifecycle orchestration, positive control, and auto-discovery of QUEUED plans. (features/tdd_plan_execute_phase_processing.feature,robot/tdd_plan_execute_phase_processing.robot) (#977) -
Breaking (behavioral):
resource_selectiondecision type reclassified from Execute-only to phase-agnostic (valid in both Strategize and Execute).DecisionType.RESOURCE_SELECTIONnow appears in bothSTRATEGIZE_TYPESandEXECUTE_TYPES. Code relying onis_strategize_typeoris_execute_typereturningFalseforresource_selectionwill see different results. Reclassification aligns with ADR-007 L72 and ADR-033 L74 which permit resource selection during planning. (#931) -
Added ResourceHandler CRUD and discovery methods: read, write, delete, list_children, diff, and discover_children. Frozen dataclass result types (Content, WriteResult, DeleteResult, DiffResult) added to the handler protocol. GitCheckoutHandler implements all six methods via git plumbing and filesystem operations. FsDirectoryHandler implements all six via pathlib/os/difflib. DevcontainerHandler implements read, write, and discover_children via
devcontainer exec. DatabaseResourceHandler inherits NotImplementedError stubs pending connection management. (#827) -
Added E2E test for Workflow Example 5: Database Schema Migration with Safety Nets (review automation profile). Exercises custom resource type registration (
resource type add), custom skill creation with spec-aligned database tools (query_db,execute_migration,backfill_column), phased child plan execution verification viaplan tree, checkpoint-based rollback viaplan rollback, and post-apply migration content verification. (robot/e2e/wf05_db_migration.robot) (#751) -
Added built-in deferred virtual resource types:
remote,submodule, andsymlinkwith equivalence metadata rules for cross-repo and cross-layer identity tracking. Registry bootstrap includes deferred virtual types but hides them fromresource addscaffolding (user_addable: false). Includes YAML configurations, Behave BDD tests (47 scenarios), Robot Framework integration tests, ASV benchmarks, and reference documentation. (#331) -
Enhanced
CorrectionServicesubtree isolation:analyze_impact()now populatesexcluded_decisionsandrollback_tier_depth; addedcompute_rollback_tier(),validate_subtree_isolation(), and dry-run report enhancements with tier-0 root-targeted warnings. Fixed status state-machine regression inexecute_revert()whereanalyze_impact()overwrote status back to ANALYZING;execute_revert()now transitions through ANALYZING before EXECUTING for correct lifecycle ordering. Fixedvalidate_subtree_isolation()to check structural-only BFS for sibling invariant so influence-DAG-caused sibling reachability is not misreported as a violation. Fixed false-positive cycle-detection warnings from convergent (diamond) topologies by using a global enqueued set in BFS instead of per-node seen_this_round. Addeddry_runenforcement guard in_assert_executable()to prevent execution of dry-run-only corrections per spec (§ plan correct --dry-run). Added terminal-state guard inanalyze_impact()to reject re-analysis after execution. Added mode validation inexecute_revert()/execute_append()to prevent mode-mismatched execution. Fixedgenerate_dry_run_report()to preserve request status (dry-run is non-mutating). Fixed tier-0 warning to only trigger when target is genuinely in the structural tree. Fixed_collect_all_decisions()to always include the target decision in the universe. Improved cycle-detection log message accuracy. Extracted cost/time estimation constants. Fixedgenerate_dry_run_report()to use try/finally for status restoration so that an exception duringanalyze_impact()does not leave the request stuck in ANALYZING status. Promoted terminal-status set to a module-level_TERMINAL_STATUSESfrozenset constant. Review-cycle fixes: fixedgenerate_dry_run_report()to also restore_impactsdict (not only status) so dry-run is fully non-mutating; fixed tier-0 warning to compare against the actual root via_find_root()rather than key-in-tree heuristic, preventing false warnings for forest topologies; fixed BFS cycle detection to log at enqueue time so the warning is reachable (previously dead code due to redundant visited vs enqueued sets); added_EXECUTABLE_STATUSESmodule-level frozenset for_assert_executable()andcancel_correction(); added_MAX_TREE_NODESguard inanalyze_impact()to reject pathologically large inputs;execute_revert()now reuses cached impact from_impactswhen available to avoid redundant O(V+E) recomputation;execute_append()now transitions through ANALYZING before EXECUTING for consistent lifecycle across both modes; event emission (_emit_correction_applied) now includesattempt_idand logs failures at error level; addedmax_length=10000toCorrectionRequest.guidancefield; moved status transition after attempt creation in both execution paths. Includes Behave BDD scenarios (influence DAG, append mode, negative isolation validation, dry-run enforcement, execute-revert end-to-end, status guard, mode mismatch, single-node tree, terminal state guard, exact-match affected count, convergent diamond DAG topology, dry-run exception recovery, execute-revert with influence edges, DAG-only nodes in excluded set), Robot Framework integration tests, and updated dry-run report model fields. (#845) -
Added deferred physical resource types for git object taxonomy (
git,git-remote,git-branch,git-tag,git-commit,git-tree,git-tree-entry,git-stash,git-submodule) and filesystem link types (fs-symlink,fs-hardlink). All types are built-in, physical, and auto-discovered with bounded scan_depth. Updatedfs-directorychild types and auto-discovery. Updatedgit-checkoutchild types. Includes YAML configs, Behave BDD tests, Robot tests, and ASV benchmarks. (#330) -
Added TDD bug-capture tests for #932 (plan apply missing --yes flag). (#950)
-
Modified
auto_progress()to complete the Apply phase immediately after transitioning from Execute to Apply, since Apply is a metadata transition with no LLM processing. This ensuresplan executedrives the plan to the terminalappliedstate when the automation profile permits (ci, full-auto profiles withauto_apply < 1.0). Extracted_complete_apply_if_queued()helper that consolidates the Apply-completion pattern (start_apply + complete_apply) into a single method with error recovery (callsfail_applyon failure) and async-job guard (skips inline completion when async execution is enabled to avoid orphaning enqueued jobs). Used byauto_progress(),lifecycle_apply_plan(), andtry_auto_run(). AddedPlanLifecycleService.try_auto_run()that drives plans through all lifecycle phases (Strategize → Execute → Apply) when automation-profile thresholds allow automatic progression; a threshold of 1.0 stops the plan at that phase boundary for human approval. Fixedlifecycle-applyCLI leaving plans stuck inapply/queuedwithout completing. The command now calls_complete_apply_if_queued()when the plan is in Apply/queued, driving it to the terminalappliedstate. Fixed stale RICH output inlifecycle_apply_planthat printed "Plan is now in Apply phase (queued)" after the plan had already reached terminalappliedstate; now branches onplan.is_terminal. Fixed SQLite UNIQUE constraint violation inLifecyclePlanRepository.update(): addedsession.flush()afterclear()on child collections (project_links, arguments, invariants) before re-inserting rows. Addedstatealias in_plan_spec_dict()JSON output for spec §Example 7jqcompatibility. Updated plan execute and lifecycle-apply reference documentation. (src/cleveragents/application/services/plan_lifecycle_service.py,src/cleveragents/cli/commands/plan.py,src/cleveragents/infrastructure/database/repositories.py,docs/reference/plan_cli.md) (#753) -
Fixed
plan executeCLI failing with "Plan is not in an executable state (current: strategize/queued)" after strategize completed successfully. Root cause:_get_plan_executor()created a secondPlanLifecycleServiceFactory instance with its own in-memory_planscache. After the executor'srun_strategize()advanced the plan toexecute/queued(viaauto_progress), the CLI handler's separate service instance returned stalestrategize/queuedstate from its cache. Fix:_get_plan_executor()now accepts an optionallifecycle_serviceparameter; theplan executehandler passes its own service instance so both share the same cache. (src/cleveragents/cli/commands/plan.py) -
Improved type safety:
_get_plan_executor()parameterlifecycle_servicenow typed asPlanLifecycleService | Noneinstead ofAny | None. (src/cleveragents/cli/commands/plan.py) -
Added BDD regression test verifying that
plan executeCLI handler passes its lifecycle service instance to_get_plan_executor(), preventing stale-cache regressions. (features/plan_lifecycle_cli_coverage.feature) -
Added M5 (v3.4.0) E2E acceptance test suite
robot/e2e/m5_acceptance.robotwith 21 zero-mock test cases covering context assembly, context policy configuration, budget enforcement, context analysis, 10,000+ file scaling, and plan execution with real LLM calls (openai/gpt-4o-mini). (#745) -
Fixed
project context setwriting policy changes viasession.flush()instead ofsession.commit(), causing silently lost data onsession.close(). (#745) -
Added
session_factoryDI provider toContainerfor CLI project-context commands. The fourproject contextsubcommands (set,show,inspect,simulate) previously calledcontainer.session_factory()which did not exist, causingAttributeErrorat runtime. (#745) -
Added Google/Gemini API key pattern (
AIzaSy...) to secret redaction inredaction.py. (#745) -
Added
--skill <SKILL>repeatable flag toagents actor runandactor-runCLI commands. The flag resolves named skills from the Skill Registry at runtime and merges their tools into agents that already have configured tools, enabling ad-hoc skill injection without modifying YAML configuration. Skill resolution uses the DI-providedSkillServicesingleton; unknown or invalid skill names produce a clear error and exit code 2. (#887) -
Added
--execution-env-priorityflag toagents plan usecommand, acceptingfallback(default) oroverrideto control execution environment routing precedence per ADR-043. IncludesExecutionEnvPriorityStrEnum on the domain model, domain-level model validation (priority requires environment),as_cli_dict()support for bothexecution_environmentandexecution_env_priority, database persistence via new columns onLifecyclePlanModelwith Alembic migration, and asave_plan()service method to re-persist CLI overrides after plan creation. (#886) -
Added estimation actor support and role-aware actor validation for issue #650.
- Schema/validation: introduced
role_hintandresponse_formatfields, plus role-aware compatibility warnings through shared validation helpers. - Preflight/CLI wiring: aligned actor registration and preflight warning paths to use the same warning logic and resolved estimation actor configs before preflight compatibility checks.
- Examples/docs/tests: added
examples/actors/estimator.yaml, updated actor example docs, and expanded Behave/Robot coverage for estimator schema and warning scenarios. - E2E helper behavior: aligned M1/M2/M3/M6 integration helper handling so missing OpenAI provider keys in local environments are controlled non-crash outcomes while tracebacks/unexpected internal failures still fail.
- Runtime enforcement of
response_formatin provider invocation remains planned and tracked via TODO comments in runtime code. (#650)
- Schema/validation: introduced
-
Added interactive TUI persona and input-mode support with a dedicated
agents tuientry point and Textual app scaffolding. Personas are now managed as local YAML configs with per-session binding/state, and input handling supports Normal (@references), Command (/slash commands), and Shell (!passthrough) flows with picker/overlay components and fuzzy matching primitives. Includes Behave feature coverage for TUI persona/input behavior, Robot TUI smoke validation, and an ASV fuzzy-reference benchmark. (#695) -
Added TDD regression tests for bug #647 (
Container.resolve()crash inplan tree,plan explain, andplan correct) using real DI wiring in Behave and Robot. Added regression-guard assertions, cache/singleton cleanup hardening, and targeted issue-648 review follow-ups. (#648) -
Added four CLI-based integration test cases to M5 E2E verification suite for v3.4.0 milestone acceptance criteria validation. Tests exercise
project create,resource add git-checkout,project link-resource, andproject showvia real subprocess calls topython -m cleveragentswith per-test workspace isolation. (#496) -
Fixed
ProjectResourceLinkRepository.create_link()andremove_link()only callingsession.flush()withoutsession.commit(), causing linked resource data to be lost between sessions. Addedfinally: session.close()to both methods to match the session-factory lifecycle pattern used by all other mutating repository methods. (#496) -
Fixed
agents plan executealways using local-only stub actors that returned empty changesets instead of invoking real LLM providers. The CLI command only performed phase transitions (Strategize → Execute) without ever running thePlanExecutorto drive the strategize or execute actors. Added_get_plan_executor()helper that resolvesProviderRegistryfrom the DI container and constructsLLMStrategizeActor/LLMExecuteActorfor real LLM calls. Updatedexecute_planCLI to detect plan phase/state and automatically invoke the appropriate actor: strategize actor when the plan is inStrategize/queued, phase transition forStrategize/complete, and execute actor forExecute/queued. Existing mock-based tests remain backward-compatible via duck-typing fallback. Newllm_actors.pymodule providesLLMStrategizeActor(task decomposition) andLLMExecuteActor(code generation) that resolveprovider/modelactor names to LangChain LLM instances.PlanExecutor.__init__now accepts optionalstrategize_actorandexecute_actorparameters with stub defaults. (#960) -
Fixed
agents action createmissing the--format/-fflag. All other action subcommands (list,show,archive) already accepted--formatand routed through_print_action(), butcreatewas the only one omitted. Runningaction create --config action.yaml --format plainpreviously failed with a Typer unrecognized-option error. Added thefmtparameter to thecreate()function signature and wired it to_print_action(). (#959) -
Added E2E acceptance test for M2 (v3.1.0): Actor Compiler + Full LLM Integration. Robot Framework test suite
robot/e2e/m2_acceptance.robotexercises actor YAML compilation into functional graphs, skill registry, tool lifecycle, and plan execution with a custom actor using real LLM API keys. Test flow: create temp git repo → register custom actor → register resource and project → create action → run full plan lifecycle (use → execute strategize → execute → diff → apply) → verify actor compilation and plan integrity. Uses[Tags] E2E,Skip If No LLM Keys, and flexible structural assertions withexpected_rc=Nonefor LLM-dependent commands. (#742) -
Fixed
plan executefailing withError [500] INTERNALwhen run in a separate CLI process fromplan use. Root cause:start_strategize()built its action registry from the in-memory_actionsdict only, missing DB-persisted actions created by prior CLI invocations. The preflight guardrail then rejected the plan with aPreflightRejectionthat escaped the CLI error handler (extends bareException, notCleverAgentsError). Fixes: (1)start_strategize()now loads the plan's action from the persistence layer before preflight checks, (2)execute_planCLI catchesPreflightRejectionfor user-friendly errors, (3)plan executeruns the execute phase inline so the plan progresses through execute/queued → execute/complete in a single CLI invocation, (4)lifecycle-applyhandles plans already auto-progressed to apply/queued bycomplete_execute(). (src/cleveragents/application/services/plan_lifecycle_service.py,src/cleveragents/cli/commands/plan.py) (#746) -
Added E2E Robot Framework acceptance test for M6 (v3.5.0) autonomy hardening milestone. Exercises session CRUD lifecycle, automation-profile list/show/set, project init with git-checkout resource, A2A plan lifecycle (use, lifecycle-list, status, execute, lifecycle-apply), guard enforcement via automation profiles, and a full autonomy acceptance flow — all via real CLI invocations. LLM-dependent tests skip gracefully when API keys are absent. Hardened shared E2E keywords: safe JSON parsing with multi-object fallback, git return-code checks, special-character-safe API-key detection,
IF/ELSEmigration from deprecatedRun Keyword If, per-test teardowns, andForce Tags. Profile list now verifies all 8 built-in profiles. Session delete confirms removal via re-list. Apply step verifies phase transition. Execute step asserts plan_id in output. JSON-quoted assertions for short profile names ("ci","auto") prevent false-positive substring matches. Added four new E2E tests covering remaining acceptance criteria: guard enforcement with custom profile (denylist, budget caps, tool-call limits), profile precedence resolution (plan-level overrides global), event queue pub/sub via plan lifecycle state transitions, and hierarchical decomposition verification viaplan tree. Post-review hardening (PR #803): LLM-dependent tests now Fail instead of Skip when API keys are present butplan usereturns non-zero. Event Queue test (AC-3) uses hard assertions for state transition verification. Hierarchical Decomposition test (AC-6) asserts at least one decision node exists after execution. Guard Enforcement Assertions verify the resolved profile name matches the expected value. ExtractedSetup Plan Test Resourceskeyword to eliminate repeated boilerplate and bring the file under the 500-line limit.Verify Plan In ListandFull Flow Apply Stepkeywords use hard assertions instead of WARN fallbacks. Profile Precedence test documents that action > global precedence requires production wiring not yet present inPlanLifecycleService.use_action. (robot/e2e/m6_acceptance.robot,robot/e2e/common_e2e.resource) (#746) -
Added E2E Robot Framework test for Specification Workflow Example 7: CI/CD Integration — Automated PR Review and Fix. Exercises the
ciautomation profile (headless, non-interactive) with JSON output and log-level configuration, idempotent resource and project registration with--branchand--descriptionflags, three-validation registration (source/mode/code) with project attachment andproject showverification, action creation with spec-aligned name (local/review-pr), completedefinition_of_done,invariants, andarguments, plan launch with--argflags, explicitplan executefor lifecycle progression,plan statusterminal-state assertion, plan diff JSON validation, and JSON output verification. Resource/project naming follows spec convention (local/ci-workspaceproject,local/ci-mainresource). Entity creation commands tolerate "already exists" for CI re-runnability.Extract JSON Fieldkeyword handles CLI debug log lines preceding JSON viaJSONDecoder.raw_decode(strict=False). Fail-fastexpected_rconly where the spec mandates error suppression (2>/dev/null || true); firstresource addandproject createnow assertexpected_rc=${0}. Config assertions use stdout-only matching and exact equality for theciprofile value. Project idempotency verified with occurrence count. Empty plan-diff stdout logged as warning. Validation naming aligned with spec (local/ci-lintper §Example 7). AllRun Processcalls includeon_timeout=killper codebase CI stability standard. Addedon_timeout=killtoRun CleverAgents CommandandCreate Temp Git Repokeywords incommon_e2e.resourcefor consistent timeout handling across all E2E suites. Dynamic actor selection based on available API keys (same pattern asm6_acceptance.robot) avoids runtime failure when only one provider key is set.Poll Plan Until Terminalkeyword now integrated into the CI Plan Launch test case per spec Step 3 polling loop. Replaced localExtract JSON Fieldwith sharedSafe Parse Json Fieldfromcommon_e2e.resource. AddedForce Tags E2Eand per-test[Teardown]blocks. AddedWF07 Suite Setupkeyword for database initialisation. Addedrobot/common_vars.pymodule placeholder for shared Robot Framework variables. (robot/e2e/wf07_cicd.robot,robot/e2e/common_e2e.resource,robot/common_vars.py) (#753) -
Fixed
agents session list,agents session create, and other session subcommands raisingAttributeError: 'DynamicContainer' object has no attribute 'db'afteragents init. Root cause:_get_session_service()calledcontainer.db()but nodbprovider existed. Added asession_serviceDI provider incontainer.pythat builds the engine, sessionmaker, and auto-committing repositories. Rewrote_get_session_service()to resolve via the container with module-level caching. Addedauto_commitparameter toSessionRepositoryandSessionMessageRepositoryto prevent resource leaks in CLI context while preserving Unit-of-Work semantics. Unified error handling across all 7 session subcommands. Includes Behave BDD regression scenarios, Robot Framework integration smoke tests, and structlog isolation for parallel test execution. (#554, #570, #680) -
Added Robot Framework E2E acceptance test for M1 (v3.0.0) milestone. Tests the complete plan lifecycle (action create → resource add → project create → plan use → plan execute strategize → plan execute → plan diff → plan apply) with real LLM API keys and no mocking. Gracefully skips when API keys are absent. (#741)
-
Added dedicated E2E test infrastructure: new
nox -s e2e_testssession running Robot Framework with--include E2Etag filter againstrobot/e2e/directory, dedicated CI job with real LLM API key secrets, graceful skip when API keys are absent, and--exclude E2Eon the standard integration test session. Includes a minimal smoke test exercisingagents --versionandagents --help. (#740) -
Implemented
tdd_expected_failtag handling in Robot Framework via a Listener v3 module (robot/tdd_expected_fail_listener.py). Tests taggedtdd_expected_failthat fail have their result inverted to pass (expected failure); tests that unexpectedly pass are reported as failed with guidance to remove the tag. Tag validation enforcestdd_bug+tdd_bug_<N>prerequisites. Includes idempotency guard against double-invocation, explicit SKIP status handling, and aclose()hook for clean teardown. Listener is registered in the noxintegration_testsandslow_integration_testssessions. Fixture files are excluded from the main pabot runner viatdd_fixturetag. Includes 9 Robot Framework integration test cases. (#628) -
Added TDD-style failing Behave BDD tests for the session list DI container missing
dbprovider bug. Three scenarios exercisesession list,_get_session_service(), andsession list --format jsonthrough the real DI path. Includes Robot Framework smoke tests and ASV benchmarks. Tests are intentionally failing (@tdd_expected_fail) until the bug fix for #554 is applied. (#631) -
Added TDD-style failing Behave BDD tests for the session create DI container missing
dbprovider bug. Three scenarios exercisesession create,session create --actor, andsession create --format jsonthrough the real DI path. Includes Robot Framework smoke tests and ASV benchmarks. Tests are intentionally failing (@tdd_expected_fail) until the bug fix for #570 is applied. (#630) -
Implemented UKO Layer 2 paradigm vocabulary specializations: Object-Oriented (
uko-oo:), Functional (uko-func:), and Procedural (uko-proc:). Added OWL/Turtle class and property definitions for all three paradigms indocs/ontology/uko.ttl. ImplementedDetailLevelMapBuilderwith insertion and integer reassignment logic for extending parent DetailLevelMaps.ParadigmVocabulary,VocabularyClass,VocabularyProperty, andVocabularyRegistryfrozen Pydantic models provide the Python API. Includes Behave BDD tests (60+ scenarios), Robot Framework integration helper, ASV benchmarks for DetailLevelMap operations, and reference documentation. Breaking:DetailLevelMap.effective_levels()now returnsMappingProxyType[str, int](read-only) instead ofdict[str, int]; callers that mutated the returned mapping must copy to adictfirst. (#575, PR #657) -
Implemented UKO Layer 3 technology-specific vocabulary extensions for Python (
uko-py:), TypeScript (uko-ts:), Rust (uko-rs:), and Java (uko-java:). Each vocabulary defines OWL classes, properties, Layer 2 dependencies, and DetailLevelMap insertions per specification lines 44405-44420. Python inserts 3 new depth levels (DECORATED_SIGNATURES, TYPE_STUBS, WITH_TESTS) producing a 15-level effective map; TS/RS/Java extend at SIGNATURES level without new insertions. Includes OWL/Turtle ontology files, ProvenanceInfo model with 2 required fields (source_resource, source_path) and 3 defaulted fields (source_range, valid_from, is_current), build_detail_level_map/resolve_detail_level utilities, and full Behave BDD tests (78 scenarios, 200 steps). (#576) -
Added
RepoIndexingServicefor repository file indexing with incremental refresh, extension-based language detection, SHA-256 content hashing, and token estimation. Supports policy enforcement via include/exclude globs, max file size, and max total size limits from projectContextConfig. Persists index metadata and per-file records to SQLite viaRepoIndexModelandIndexedFileModel. Domain models (IndexStatus,FileRecord,IndexMetadata,RepoIndex) are frozen Pydantic v2 with ULID IDs and UTC datetimes. Wired into the DI container. Includes 28 Behave BDD scenarios, 3 Robot Framework integration tests, ASV benchmarks (5 time + 2 track), and reference documentation. (#195) -
Wired retry policies and circuit breakers into the service layer.
RetryPolicyConfigandCircuitBreakermodels govern per-service retry behaviour (max attempts, backoff strategy, delay bounds, jitter) and circuit breaker protection (failure threshold, recovery timeout, half-open probing, cooldown).ServiceRetryWiringinitialises fromSettings, createsCircuitBreakerinstances per service, and exposesexecute()/async_execute()helpers.retry_service_operationdecorator adds retry + circuit breaker to any service method via a single annotation. Structured logs are emitted on every retry attempt and when a circuit breaker opens. Retry amplification is prevented by acontextvarsnesting guard. Per-service overrides are loaded from theretry_service_overridesJSON config key. Includes Behave BDD unit tests, Robot Framework integration tests, and ASV benchmarks. (#313) -
Added container-aware tool execution and I/O forwarding via
ContainerToolExecutorandPathMapper. Tools routed toexecution_environment: containerare executed inside a provisioned devcontainer with automatic host↔container path mapping, bounded output capture (50 MiB), structured error reporting, and container metadata on theToolInvocationaudit trail. IncludesContainerConfig,ContainerMetadata,ContainerExecutionError, andContainerTimeoutErrordomain models,ToolRunnercontainer routing integration, safe environment filtering, symlink/traversal protection, andsync_results_to_hostfor file-based result retrieval. Covered by Behave BDD scenarios, Robot Framework integration tests, ASV benchmarks, anddocs/reference/execution_environment.md. (#515) -
Implemented
@tdd_expected_failtag handling in Behave environment hooks. Addedvalidate_tdd_tags()andshould_invert_result()helper functions infeatures/environment.py. Scenarios tagged@tdd_expected_failthat fail have their result inverted to pass (expected failure); scenarios that unexpectedly pass are reported as failed with guidance to remove the tag. Tag validation enforces@tdd_bug+@tdd_bug_<N>prerequisites. Implemented viaScenario.run()monkey-patch inbefore_all. Includes 34 Behave BDD scenarios (19 tag-validation, 14 infrastructure, and 1 demo) and 12 Robot Framework integration test cases. (#627) -
Wired
AuditService.record()into domain services via EventBus auto-dispatch. CreatedAuditEventSubscriberthat subscribes to 9 security-relevant event types (plan_applied,plan_cancelled,resource_modified,correction_applied,config_changed,entity_deleted,session_created,auth_success,auth_failure) and persists them viaAuditService.record()with secret masking applied to all audit log details (alwaysshow_secrets=False). Subscriber enriches audit entries withsession_idandcorrelation_idfrom the domain event for traceability. WiredPlanLifecycleServiceto emitPLAN_APPLIEDandPLAN_CANCELLEDevents with all project names in event details. Added 5 newEventTypeenum members. Registered subscriber as eagerly-initialized singleton in DI container.AuditServicenow accepts an explicitdatabase_urlparameter so it shares the same database as the rest of the application. AllEventBus.emit()call sites are wrapped in try/except guards with structured logging, andReactiveEventBusisolates per-handler failures so one failing subscriber cannot block others.server connectnow emits per-settingCONFIG_CHANGEDaudit events viaset_value().SessionService.delete()emitsENTITY_DELETED. Exception messages in the DI container bootstrap are redacted before logging.CorrectionServiceis registered as a singleton in the DI container. Includes 23 Behave BDD scenarios, 5 Robot Framework integration tests, and ASV benchmarks. (#581)
Added
- Resource type single-inheritance via
inheritsfield (ADR-042) (#513) - Inheritance chain resolution, field merging, and polymorphic type matching
ToolRegistry.find_tools_for_resource()for polymorphic tool binding- Polymorphic handler resolution with ancestor-type fallback
- CLI:
agents resource type listshows Inherits column;type showdisplays inheritance chain - Alembic migration
m6_004_resource_type_inheritsaddsinheritscolumn toresource_types - Fixed
agents actor listraising a validation error on fresh projects.ActorRegistry._actor_name()built names viaf"{provider}/{model}", which produced names with 2+ slashes when providers had models containing/(e.g. OpenRouter'santhropic/claude-sonnet-4-20250514). Now sanitises both provider and model names by replacing/with-and lowercasing to satisfy the spec pattern. Note: provider/model names are now lowercased; existing mixed-case built-in actors will be superseded by lowercased versions on the nextensure_built_in_actors()call. Includes Behave BDD regression scenarios, Robot Framework integration smoke tests, and ASV benchmarks. (#592) - Added TDD regression tests for
agents session listDI container wiring error (bug #554)._get_session_service()callscontainer.db()but theContainerclass has nodbprovider, raisingAttributeError. Includes 10 Behave BDD scenarios (@tdd_bug @tdd_bug_554 @tdd_expected_fail) covering empty list, empty-list format validation (JSON/YAML/plain), init-then-list lifecycle, post-create list, rich/JSON/plain/YAML output formats, and stderr error-path assertions. Robot Framework integration smoke tests and ASV service-layer benchmarks. Implements@tdd_expected_failinfrastructure (Behaveafter_scenariohook and Robot listener) and migrates 18 existing TDD scenarios from@tdd @bugNNNto@tdd_bug @tdd_bug_NNNconvention. (#554) - Added TDD regression tests for
agents session createDI container wiring error (bug #570)._get_session_service()callscontainer.db()but theContainerclass has nodbprovider, raisingAttributeError. Same root cause as #554. Includes 4 Behave BDD scenarios (@tdd_bug @tdd_bug_570 @tdd_expected_fail), Robot Framework integration smoke tests, and ASV service-layer benchmarks. Tests exercise the real DI path with_service = Noneand a file-based SQLite database. Also implements the@tdd_expected_failinversion infrastructure: a Behaveafter_scenariohook infeatures/environment.pythat flips pass/fail for@tdd_expected_failscenarios, and a Robot Framework Listener API v3 plugin (robot/tdd_expected_fail_listener.py) with identical semantics. Migrates 18 existing TDD scenarios from the old@tdd @bugNNNconvention to standardised@tdd_bug @tdd_bug_NNNtags. (#570) - Fixed intermittent race condition in M4 validation integration tests when
running under pabot. Root cause was three-pronged: shared SQLite DB URL,
shared CLEVERAGENTS_HOME directory, and singleton leaks in chained CLI
helper invocations. Introduced composable
Setup Database Isolationkeyword incommon.resource, per-suite temp directories, and centralisedreset_global_state()inrobot/helpers_common.py. Addedtimeout=30sto allRun Processcalls inm4_e2e_verification.robot. (#563) - Fixed
agents project shownot finding a project immediately after creation. Extended thesession.commit()fix from #589 to also coverupdate()anddelete()inNamespacedProjectRepository, and updated the class docstring to reflect that all mutating methods now commit within their own session. Includes 3 Behave BDD regression scenarios, Robot Framework integration smoke tests, and ASV benchmarks. (#590) - Fixed
agents project createnot persisting projects to the database.NamespacedProjectRepository.create()calledsession.flush()but neversession.commit(), so projects were invisible to subsequentagents project listcalls. Addedsession.commit()and afinally: session.close()guard. Includes 4 Behave BDD regression scenarios, Robot Framework integration smoke tests, and ASV benchmarks. (#589) - Added TDD-style Behave BDD tests for the built-in
git-checkoutresource type bootstrap. Three scenarios: one failing TDD test reproducing bug #524 (no bootstrap called during init), and two regression tests verifyingbootstrap_builtin_types()seeds correct data andagents resource add git-checkoutsucceeds. Includes Robot Framework regression tests. (Drive-by: corrected bug reference from #523 to #524.) (#553) - Added TDD-style Behave BDD tests for the built-in
fs-directoryresource type bootstrap. Three scenarios: one failing TDD test reproducing bug #524 (no bootstrap called during init), and two regression tests verifyingbootstrap_builtin_types()seeds correct data andagents resource add fs-directorysucceeds. Includes Robot Framework regression tests. (#537) - Added TDD-style failing Behave BDD tests for the missing
agents init --yesflag. Five scenarios: four TDD-failing tests (exit code, prompt suppression,-yalias, output summary) and one regression guard for interactive mode. Includes Robot Framework smoke tests and ASV benchmarks. Tests are intentionally failing until the bug fix for #522 is applied. (#536) - Added Temporal Data Model (Revision-Aware RDF) with 3 storage tiers for
the ACMS. Temporal metadata fields (
valid_from,valid_until,is_current,is_revision_of) on UKO InformationUnit nodes enable revision chain tracking: when code changes, old nodes are marked historical and new revision nodes are created with back-links. Three storage tiers (hot/warm/cold) filter nodes by temporal scope (current/recent/all) with configurable retention (warm_retention_hoursdefault 24h,cold_retention_daysdefault 90d). IncludesTemporalMetadata,TemporalNode,RevisionChain,TierQueryResult,TierRetentionConfigfrozen domain models,TemporalBackendprotocol,InMemoryTemporalBackendstub,TemporalServicewith structlog and DI,BackendSet.temporaltyping upgrade fromobject | NonetoTemporalBackend | None. 99 Behave scenarios, 8 Robot Framework tests, ASV benchmarks, and reference documentation. (#577) - Implemented UKO Layer 1 Domain Ontologies (
uko-doc:,uko-data:,uko-infra:) in the OWL/Turtle ontology file (docs/ontology/uko.ttl). Added 17uko-doc:classes (Document, Section, Paragraph, Citation, etc.), 13uko-data:classes (Table, Column, ForeignKey, View, etc.), and 7uko-infra:classes (Service, Endpoint, Port, etc.) with all spec-mandated properties and relationships. Updated all four DetailLevelMap presets (code_detail_map,docs_detail_map,database_detail_map,infra_detail_map) to be spec-complete with every named level. AddedOntologyRegistrywith domain lookup, Layer 1 listing, DetailLevelMap inheritance chain building, and Turtle syntax validation. Includes 31 Behave BDD scenarios and 6 Robot Framework integration tests. (#574) - Added
PostgreSQLAnalyzerandDockerComposeAnalyzerdomain-specific analyzers (Phase 2 of issue #588).PostgreSQLAnalyzerparses DDL content via regex and extractsuko-data:Table,uko-data:Column,uko-data:ForeignKey,uko-data:View, anduko-data:Schematriples with column metadata (data type, nullability, primary key).DockerComposeAnalyzerparses Docker Compose YAML viayaml.safe_loadand extractsuko-infra:DeploymentUnit,uko-infra:Service,uko-infra:Port,uko-infra:EnvironmentVariable, anduko-infra:connectsTotriples. Both satisfyAnalyzerProtocoland register inAnalyzerRegistryby file extension. Includes 34 Behave BDD scenarios covering all four analyzers (protocol conformance, registry operations, triple extraction, error handling, cross-analyzer URI scheme and confidence checks), 6 Robot Framework integration smoke tests, and updated__init__.pyexports. (#588) - Added TDD-style Behave BDD tests for the built-in
git-checkoutresource type bootstrap. Three scenarios: one failing TDD test reproducing bug #524 (no bootstrap called during init), and two regression tests verifyingbootstrap_builtin_types()seeds correct data andagents resource add git-checkoutsucceeds. Includes Robot Framework regression tests. (#553) - Added UKO Indexer for real-time index synchronization.
UKOIndexerorchestrates analysis of resources into UKO triples via pluggableAnalyzerRegistryand simultaneously indexes into text, vector, and graph backends. Provenance metadata (ProvenanceMetadata,ProvenancedTriple) is attached to every triple, tracking source resource, file path, and temporal validity. Write-side index backend protocols (TextIndexBackend,VectorIndexBackend,GraphIndexBackend) are distinct from the existing read-side query protocols. Graceful degradation: if text or vector backends areNone, the corresponding indexing step is silently skipped. Index lifecycle:index_resource(add),remove_resource(cleanup),reindex_resource(change).ContentReaderprotocol decouples the indexer from filesystem I/O.IndexLifecycleHookprovides callbacks for indexing events. In-memory stub implementations for all three backends.ResourceFileWatchermonitors filesystem paths via watchdog and triggers re-indexing callbacks on file changes with configurable debouncing and optionalRESOURCE_MODIFIEDEventBus emission. Includes 166 Behave BDD scenarios, 9 Robot Framework integration tests, ASV benchmarks, and reference documentation. (#578) - Added built-in virtual core resource types (
file,directory,commit,branch,tag,tree) underexamples/resource-types/. All useresource_kind: virtual,sandbox_strategy: none,user_addable: false. Equivalence metadata defines identity criteria per type (content hash for files, git object identity for commits/branches/tags/trees). Extended bootstrap registration inResourceRegistryServiceto include virtual types and updatedResourceTypeSpec.BUILTIN_NAMES. Added reference documentation indocs/reference/resource_types_builtin.md. Includes Behave BDD tests, Robot integration tests, and ASV benchmarks. (#329) - Added general-purpose domain event system under
cleveragents.infrastructure.events.EventTypeStrEnum defines 38 typed event identifiers across 9 domains (plan lifecycle, decision, invariant, actor, tool, resource, sandbox, context, validation, session, budget).DomainEventis a frozen Pydantic model withevent_type, auto-UTCtimestamp, auto-ULIDcorrelation_id,plan_id,root_plan_id,session_id,actor_name,project_name, anddetailsfields.EventBusis a@runtime_checkableProtocol withemit()andsubscribe()methods.ReactiveEventBusis an RxPYSubject-backed in-process bus that dispatches synchronously to type-filtered handlers and exposes a rawrx.Observablestream for advanced operators.LoggingEventBusis a structlog-based bus for audit logging that requires no RxPY dependency.DecisionServiceandPlanLifecycleServiceaccept an optionalevent_busparameter (backward-compatible) and emitDECISION_CREATED,PLAN_CREATED, andPLAN_PHASE_CHANGEDon significant state changes.ReactiveEventBusis registered as a Singleton in the DI container and wired into both services automatically. Includes Behave BDD unit tests (27 scenarios, 75 steps, 100% coverage on all new source files), Robot Framework smoke tests (9 cases), ASV performance benchmarks (5 suites), and reference documentation (docs/reference/event_bus.md). (#473) - Validated M4 acceptance criteria for v3.3.0 milestone closure. All M4 E2E verification
tests and correction/subplan smoke tests pass against the final v3.3.0 implementation.
Added CLI-exercising integration tests for
plan use,plan execute, andplan treecommands to verify the milestone success criteria through actual Typer CLI invocations. Split 1074-line helper into six focused modules (_common,_domain,_merge,_cli,_cli_errors, dispatcher) under the 500-line limit. Added CLI error-path tests for read-only plan execute, unavailable action, missing changeset, and empty decision tree. Extracted_make_subplan_statusfactory,_assert_exit_codeand_assert_mock_called_once*wrappers, frozen timestamp constant, andshutil.whichgit pre-check. Removed tautological domain assertions inplan_treeandparallel_max. Fixed CONTRIBUTORS.md alphabetical ordering. (#495) - Added minimal LSP server stub with
agents lsp serveCLI command supporting theinitialize,shutdown, andexitlifecycle handshake over JSON-RPC stdin/stdout transport with Content-Length header framing. Unsupported methods returnMethodNotFound(-32601); requests beforeinitializereturnServerNotInitialized(-32002); requests aftershutdownreturnInvalidRequest(-32600). Transport hardening includes 10 MB max content-length, 32 max header lines, graceful recovery from malformed messages, and recursion-depth protection.LspServerstores anA2aLocalFacadefor future server-mode wiring.--log-levelflag controls logging verbosity. Includes 48 Behave BDD scenarios, Robot Framework smoke tests, ASV startup latency benchmarks, anddocs/reference/lsp_stub.md. (#203) - Validated M3 acceptance criteria for v3.2.0 milestone closure. All 10 E2E
verification tests pass against the final implementation, exercising real
CLI command paths (
plan use,plan execute,plan tree,plan explain, project-scopedinvariant add/list, dry-run and liveplan correct), database-backed persistence, context snapshots, and invariant enforcement during strategize. Added acceptance criteria tags and milestone documentation to the robot suite. (#494) - Added scoped backend view filtering for project-resource isolation in ACMS.
ResourceScopeholds the resolved set of resource ULIDs and project names visible to a plan (immutable, withinclude_paths/exclude_pathsglob filtering viaPurePath.full_match()).ScopedBackendViewwraps text/vector/graph backends to auto-inject thescopeparameter into every query, and filtersTieredFragmentvisibility by project name and resource ID.ScopedBackendSetbundles scoped views for all three backend types.ResourceAliasResolvertranslates user-facing aliases to canonical resource ULIDs with uniqueness validation.resolve_resource_scope()builds aResourceScopefrom projects with allowlist/denylist filtering.validate_project_scope()andvalidate_resource_scope()guard against out-of-scope access. Three enforcement hooks added toContextTierService:get_scoped_by_resource,validate_fragment_scope,store_with_scope_check. Includes 74 Behave BDD scenarios (with full coverage-gap tests), 8 Robot Framework integration tests, ASV benchmarks, and reference documentation. (#193) - Added
builtin/plan-subplantool for strategy actors to emitSUBPLAN_SPAWNorSUBPLAN_PARALLEL_SPAWNdecisions. Validates payload viaSubplanPayload(Pydantic), applies defaults (merge strategy, max_parallel, dependencies), generates rationale text, and optionally persists theDecisionvia an injectedDecisionService. Includesregister_subplan_tool,make_plan_subplan_specfactory, Behave unit tests, Robot Framework integration smoke tests, ASV benchmarks, and an actor YAML example. (#198) - Extended
CorrectionService._compute_affected_subtree()to BFS over both the structural decision tree (parent-child) and the influence DAG (decision_dependenciesedges). Added cycle detection guard via visited set. UpdatedDecisionService.record_decision()to acceptdependency_decision_idsparameter for recording influence relationships during decision creation. AddedDecisionService.get_influence_edges()to retrieve influence DAG as adjacency list. All public methods onCorrectionService(analyze_impact,execute_revert,execute_correction,generate_dry_run_report) now accept optionalinfluence_edgesparameter. Includes Behave BDD scenarios, Robot Framework integration tests, and ASV benchmarks. (#542) - Added Semantic Escalation system with
AutonomyControllerclass implementingshould_proceed_automatically()that computes confidence scores from weighted factors (past_success_rate, codebase_familiarity, risk_assessment, invariant_complexity) and compares them against automation profile thresholds. IncludesEscalationDecision,ConfidenceFactors,OperationContext, andHistoricalOutcomedomain models. Historical success tracking records outcomes for future confidence computation. Integrates with all 8 built-in automation profiles. DI-wired as singletonautonomy_controller. Includes 48 Behave BDD scenarios, 10 Robot Framework integration tests, and ASV benchmarks. (#546) - Added context strategy registry with
ContextStrategyprotocol,StrategyCapabilities,BackendSet,PlanContext,StrategyConfig,ContextStrategyResult, andStrategyRegistryEntrydomain models. Six built-in stub strategies (simple-keyword, semantic-embedding, breadth-depth-navigator, arce, temporal-archaeology, plan-decision-context) with spec-mandated quality scores and backend requirements.StrategyRegistrysupports config-driven registration, per-strategy timeout/max-fragment limits, per-project enable/disable overrides, plugin discovery from"module:ClassName"strings, and validation that strategies declare supported resource types. (#191) - Fixed
context inspectto display project-scoped tier fragment counts instead of global counts. AddedContextTierService.get_scoped_metrics()which returns fragment population counts filtered to the target project while keeping hit/miss counters as global service metrics. (#499) - Fixed
context simulate --focusto filter fragments by the specified focus URIs during dry-run assembly. Previously, focus URIs were passed toContextRequestbut not applied to fragment selection, making--focusa no-op. (#499) - Wired project context CLI stubs (
inspect,simulate,set,show) to live ACMS pipeline services.context inspectqueriesContextTierServicefor tier metrics and per-project fragments with optional filtering by strategy, focus area, breadth, and depth.context simulateperforms dry-run context assembly using CRP models with configurable token budget and assembly strategies.context setgains 12 ACMS pipeline options (hot_max_tokens,warm_max_decisions,cold_max_decisions,summary_max_tokens,temporal_scope,auto_refresh,focus_area,breadth,depth,assembly_strategy,retrieval_strategy,summary_strategy).context showdisplays ACMS pipeline configuration alongside context policy. Includes 28 Behave BDD scenarios for wiring coverage, updated Robot Framework integration tests, and reference documentation. (#499) - Added async command execution infrastructure allowing plan phases (Execute,
Apply) to run as background jobs processed by a thread pool of workers.
AsyncJobPydantic v2 domain model with ULID primary key, status state machine (queued -> running -> succeeded/failed/cancelled), and payload schema versioning.AsyncWorkerservice withThreadPoolExecutor-backed concurrent execution, race-safe cancellation contract, stuck job detection, and job cleanup.InMemoryJobStorewith atomicsnapshot_counts()and single-passremove_expired(). Plan lifecycle service wired to enqueue jobs whenasync.enabledis True. Error messages redacted viashared/redaction.pybefore persisting to the audit trail. Configurable viaasync.enabled,async.max_workers,async.poll_interval,async.job_timeout,async.job_ttl. IncludesAsyncJobModelSQLAlchemy model, Alembic migration, Behave BDD scenarios, Robot Framework integration tests, ASV benchmarks, anddocs/reference/async_architecture.md. (#312) - Added hot/warm/cold context tiers with
ContextTier,ActorRole,TieredFragment,TierBudget,ActorContextView,TierMetrics, andScopedBackendViewmodels.ContextTierServiceprovides store/get, promotion/demotion with cold-tier summarisation hook, LRU eviction, per-actor filtered views (strategist/executor/reviewer), and project-scoped isolation. Settings:context_max_tokens_hot,context_max_decisions_warm,context_max_decisions_cold. DI-wired as singletoncontext_tier_service. Includes Behave BDD scenarios, Robot Framework integration tests, ASV benchmarks, anddocs/reference/context_tiers.md. (#208) - Added
ExecutionEnvironmentenum (host,container) and execution environment routing with priority chain (tool > plan > project > default). IncludesExecutionEnvironmentResolverservice,--execution-environmentCLI flags onagents plan useandagents plan execute, project-level context config support viaagents project context set --execution-environment, tool runner wiring with container availability validation, and clear error when container is selected but no container resource is linked. Covered by Behave BDD scenarios, Robot Framework smoke tests, and ASV benchmarks. (#512) - Added multi-project subplan support with
MultiProjectMetadata,ProjectScope,ChangeSetSummary,CrossProjectDependency, andProjectScopeResolverdomain models.MultiProjectServiceprovides scope initialization, context resolution, per-project changeset recording, and cross-project constraint validation. Plan model extended withmulti_project_metadatafield,is_multi_projectproperty, andget_project_scope()method. CLIplan statusshows per-project changeset summaries for multi-project plans. Includes Behave BDD scenarios, Robot Framework smoke tests, ASV benchmarks, and reference documentation. (#199) - Added large-project hierarchical decomposition with 4+ levels and bounded context per
subplan. Includes clustering heuristics (directory, language, size), bounded dependency
closure with memoization for 10K+ files, DAG execution ordering with cycle detection,
and DecisionService integration for strategy_choice + subplan_spawn recording.
Configurable via
planner_max_depth,planner_max_files_per_subplan,planner_max_tokens_per_subplan,planner_min_files_per_subplansettings. (#205) - Added
LLMTracePydantic v2 domain model andllm_tracesdatabase table withLLMTraceRepositoryfor persisting LLM call telemetry (tokens, cost, latency, tool calls, context hash, streaming flag, retry count, error). Defined 14OperationalMetricKeyvalues withMetricEntry/MetricCollectorfor plan-level metrics.TraceServiceprovides recording, querying, metric computation, and optional LangSmith forwarding whenLANGCHAIN_TRACING_V2=true. (#500) - Added
SafetyProfiledomain model with configurable safety constraints (allowed skill categories, sandbox/checkpoint requirements, human-approval flag, cost/retry limits) and integrated it into theActionmodel viafrom_config/as_cli_dict. Persistence backed bysafety_profile_jsoncolumn onLifecycleActionModelwith Alembic migrationc4_001_safety_profile_column. Includesresolve_safety_profile()stub that raisesNotImplementedErrorin local mode (real enforcement deferred to server mode). Covered by 26 Behave BDD scenarios, 6 Robot Framework smoke tests, 5 ASV benchmark suites, anddocs/reference/safety_profile.mdreference documentation. (#332) - Added
devcontainer-instance,devcontainer-file, andcontainer-instancebuilt-in resource types withDevcontainerHandlerand auto-discovery logic that scans for.devcontainer/directories whengit-checkoutorfs-directoryresources are linked. Includes CLI support, Behave/Robot/ASV tests, and reference documentation. (#511) - Added full lifecycle management for
devcontainer-instanceresources: lazy activation on first tool target viaDevcontainerHandler.resolve(), health checking with periodic liveness probes, manualagents resource stop/agents resource rebuildCLI commands (rebuild passes--reset-containerto force container recreation), and automatic session-scoped cleanup on session close or plan completion. Lifecycle state tracked viaContainerLifecycleTrackerwith six states (detected/building/running/stopping/stopped/failed) and validated transitions. Includes Behave BDD scenarios, Robot Framework integration tests, ASV benchmarks, and reference documentation. (#514) - Added skeleton compressor service (
SkeletonCompressorService) for ACMS context inheritance. Compresses parent plan context fragments byskeleton_ratio(0.0–1.0) for propagation to child plans. PersistsSkeletonMetadata(ratio, token counts, source decision IDs) on the plan model for auditability. Includes stable fragment ordering, ratio validation with default handling, and compression summary. (#194) - Wired A2A local facade handlers to live application services.
session.create/closedelegate toSessionService;plan.create/execute/status/diff/applydelegate toPlanLifecycleService;registry.list_toolsandregistry.list_resourcesdelegate toToolRegistryandResourceRegistryService;event.subscribedelegates toA2aEventQueue.context.getreturns a stub pending ACMS pipeline. Added domain-to-A2A error code mapping (NOT_FOUND,VALIDATION_ERROR,INVALID_STATE,PLAN_ERROR, etc.) viamap_domain_error(). (#501) - Added
plan explainandplan treeCLI commands for decision tree inspection with json/yaml/table/rich output formats, and flags for superseded decisions, context snapshots, and reasoning details. (#174) - Replaced behave-parallel subprocess-per-feature execution model (342 Python interpreter
startups) with in-process execution via behave's
RunnerAPI. Sequential mode runs all features in a singleRunner.run()call; parallel mode usesmultiprocessing.Poolwithforkfor COW sharing of heavy modules. Coverage pipeline simplified to a single slipcover invocation wrapping the entire process. Unit tests: 24m21s -> 2m05s (91% reduction); coverage report: 75m20s -> 3m00s (96% reduction). (#481) - Optimized 20 medium-slow BDD features (10-100s tier). Capped
time.sleepandasyncio.sleepglobally at 10ms inbefore_allto eliminate retry/backoff waits; originals saved astime._original_sleep/asyncio._original_sleepfor timing-sensitive tests. Replacedsubprocess.runCLI invocations withCliRunnerin coverage step files. Switched persistence features to in-memory SQLite by default. Total tier runtime reduced from 565s to 21s (96%). (#480) - Optimized the 8 slowest BDD feature files (100-248s each, 64% of total runtime). Added
@mock_onlytag support to skip unnecessary DB setup, extracted shared service-setup helpers inservices_coverage_steps.py(~200 lines of duplicated boilerplate removed), and introduced lightweight in-memory plan service for actor-resolution tests. (#479) - Added pre-migrated SQLite template database via
scripts/create_template_db.pyto eliminate repeated Alembic migrations per BDD scenario. Nox sessions propagate the template viaCLEVERAGENTS_TEMPLATE_DBenv var;features/environment.pymonkey-patchesMigrationRunner.init_or_upgradeto copy the template for fresh scenario temp DBs, falling through to real migrations for:memory:, existing files, and migration-runner unit tests. (#483) - Replaced coverage.py (sys.settrace) with slipcover (bytecode instrumentation) for faster coverage collection. Each behave-parallel worker now produces per-feature JSON coverage files; slipcover --merge combines them. CI workflow JSON key lookups handle both slipcover and coverage.py output formats. Documentation updated to reflect slipcover as the coverage tool. (#482)
- Added checkpointing and rollback with
CheckpointServicefor creating, listing, pruning, and deleting sandbox snapshots, and restoring sandbox state viaplan rollback <plan_id> <checkpoint_id>CLI command. Checkpoint domain models (Checkpoint,CheckpointMetadata,CheckpointRetentionPolicy,RollbackResult) store sandbox refs, decision alignment, checkpoint type (pre_write,post_step,manual), filesystem path, size, and structured audit metadata (reason, source tool, phase). Retention policy auto-prunes oldest interior checkpoints when exceedingmax_checkpoints(default 50), preserving the first and most recent. Guards reject rollback when plan is applied or sandbox is missing.CorrectionServiceaccepts an optionalCheckpointServiceintegration point for future revert delegation.CheckpointRepositoryandCheckpointModelback persistence via the session-factory pattern (ADR-007), withUnitOfWorkContext.checkpointsfor cross-repository atomicity. Alembic migrationm6_001_checkpoint_metadataadds thecheckpoint_metadatatable. Includes Behave BDD scenarios (33 scenarios, 129 steps), Robot Framework integration tests (11 test cases), ASV benchmarks, anddocs/reference/checkpointing.md. (#206) - Added semantic validation service with AST-based rules for syntax errors, missing imports, broken references, duplicate imports, API misuse, and missing symbols. Includes rule registry, file-hash LRU cache, severity mapping, and ValidationPipeline integration. (#448)
- Added comprehensive M6 autonomy acceptance test suite covering A2A local facade dispatch (session/plan/registry/context/event operations), event queue pub/sub with local callbacks and close semantics, HTTP transport stub rejection, version negotiation, automation profile built-ins (8 profiles), custom profile creation/validation/YAML loading, guard enforcement (denylist, allowlist, call-limit, cost-budget, write-approval, apply-approval), and profile service 4-level resolution precedence. Includes Behave BDD scenarios (52), Robot Framework integration tests (11), ASV performance benchmarks (5 suites), JSON fixtures, and documentation update. (#211)
- Added MCP refresh hooks to wire
notifications/tools/list_changedevents from MCP servers toSkillRegistry. IntroducedSkillRegistry.refresh(name)andrefresh_all()to recompute flattened tool sets on demand. AddedMCPRefreshHookwith configurable debounce window (default 0.5 s) to coalesce rapid notification bursts into a single refresh call. Refresh skips tool-ref validation when noToolRegistryis configured and emits a singleWARNINGwith recovery steps. Results are summarised as an immutableSkillRefreshResult(refreshed / failed / skipped counts) for CLI and log output. Includes Behave unit tests (19 scenarios), Robot Framework integration tests (10 tests), ASV benchmarks, anddocs/reference/skill_refresh.md. (#168) - Added
agents skill refresh <name>|--allcommand to recompute tool flattening and sync MCP-backed skills. Enhancedskill list,skill show, andskill toolsoutputs with capability summary fields, tool counts, and description columns. Added--format json/yamlschemas for refresh output. Updated CLI reference documentation with refresh examples and caching behavior. (#167) - Added UKO Layer 0-3 ontology scaffolding (RDF/TTL) aligned with specification
Section 14. Layer 0 (
uko:) defines InformationUnit, Container, Atom, Annotation, Boundary plus contains/references/dependsOn relationships, content properties (hasRendering, renderingDepth, hasFullContent), provenance properties (sourceResource, sourcePath, sourceRange), and temporal properties (validFrom, validUntil, isCurrent, isRevisionOf). Layer 1 (uko-code:) defines Module, Callable, TypeDefinition, TestCase, Import plus hasReturnType/hasParameters/testsCallable. Layer 2 (uko-oo:) defines Class, Interface, Method, Attribute plus inheritsFrom/implements withrdfs:subPropertyOf. Layer 3 is reserved for DetailLevelMap insertions. Loader supports semantic domain prefixes, hyphenated prefix names, full-URI layer detection, multi-parentrdfs:subClassOf(DAG traversal via BFS),rdfs:domain/rdfs:range/rdfs:subPropertyOfresolution, and non-existent parent validation. (#189) - Added ACMS v1 context assembly pipeline with UKO and CRP integration, three fusion strategies (relevance, recency, tiered), budget-constrained assembly, and extensible strategy registration. (#188)
- Added
AgentSkillSpecloader that parses SKILL.md frontmatter and progressive disclosure sections into structuredSkillStepobjects with stable 1-based ordering. Supports namespaced naming (namespace/short_name), optionalsteps,version,compatibility,metadata, andallowed-toolsfrontmatter fields. Explicit validation raises actionable errors for missingname/descriptionand invalid namespace format. Agent Skills are mapped toAgentSkillToolDescriptorwithsource="agent_skill"and read-only defaults. Support directories (scripts/,references/,assets/) are discovered automatically and exposed as read-onlyAgentSkillResourceSlotbindings. Includesdocs/reference/agent_skills.md, Behave unit tests, Robot Framework integration tests, and ASV benchmarks. (#160) - Added MCP adapter runtime (
MCPToolAdapter) to connect to external MCP servers via stdio, SSE, and streamable-http transports. Supports full connection lifecycle (connect with timeout, reconnect, disconnect), tool discovery, input-validated invocation, and bulk registration intoToolRegistrywithsource="mcp"andcheckpointable=False. Includes Behave unit tests, Robot integration test, ASV benchmarks, anddocs/reference/mcp_adapter.md.
fix(permissions): address code-review findings for permission system (#448)
- Added input validation to
check_permission()andget_role_bindings(): empty or whitespace-onlyprincipalandscope_idarguments now raiseValueErrorafter stripping, preventing silent lookup misses. - Aligned module docstring and reference docs to clarify that the
enforce_permissiondecorator is available but not yet wired into CLI or service call sites — integration is deferred to a future pass. - Added
permissions.mdto the docs nav ingen_ref_pages.py. - Added Behave BDD scenarios covering empty, whitespace-only, and
leading/trailing-whitespace inputs for both
check_permission()andget_role_bindings().
feat(actor): extend hierarchical actor YAML schema and loader
- Extended actor YAML schema with hierarchical graph support: per-node LSP bindings (
lsp_binding), tool-source references (tool_sources), and subgraphactor_ref. - Added graph reachability validation — all nodes must be reachable from
entry_nodevia edges or conditional routing targets. - Improved loader error reporting with YAML line/column positions and Pydantic field-path hints.
- Added
docs/reference/actor_config.md— practical configuration reference with hierarchical examples and error cases. - Fixed
examples/actors/graph_workflow.yamlto useactor_refinstead of deprecatedactor_path. - Added Robot smoke test for loading hierarchical actor YAML via
ActorLoader.discover()(#157). - Added decision persistence layer with DecisionRepository, DecisionModel, Alembic migration, tree queries (BFS traversal, path-to-root), superseded lookup, and ordered decision path retrieval. Includes Behave BDD scenarios, Robot Framework integration tests, and ASV benchmarks. (#171)
- Added token/cost tracking, budget enforcement (per-plan and per-day), provider fallback
selection with capability filtering, and cost metadata for plan execution. New config keys
budget_per_plan,budget_per_day, andfallback_providerscontrol spending limits and provider ordering. Budget warnings are emitted at 90% usage, and requests are blocked at 100%. Per-provider cost table includes default token cost estimates for offline reporting. Budget exhaustion events are persisted in plan metadata for auditability. (#324) - Added comprehensive Behave, Robot Framework, and ASV test coverage for CLI extension features including automation profile resolution, invariant ordering, actor override error cases, and output format snapshot assertions.
- Added comprehensive E2E test suite for M2 (Actor Graphs + Tool Sources) epic covering actor YAML loading, skill registry, tool lifecycle, and MCP stub tool discovery with Behave BDD scenarios, Robot Framework integration tests, and ASV performance benchmarks.
- Added plan-level and project-level advisory locking with configurable timeouts, re-entrant acquisition, conflict detection, lock renewal, graceful shutdown release, startup cleanup of expired locks, and diagnostics check for stale lock reporting. (#327)
- Added core plan apply service with diff review output (plain, rich, JSON, YAML), artifact summaries, apply summary persistence, merge-failure handling with sandbox rollback, and empty ChangeSet guard. (#155)
- Added validation pipeline with rule-based checks, severity levels (required vs informational), result aggregation, deterministic execution ordering, per-validation timeouts, and gate enforcement that blocks apply when required validations fail. (#175)
- Added validation-gated apply pipeline that blocks the Apply phase when required Execute-phase validations have not passed, transitions plans to constrained state with actionable CLI hints, and runs validation attachments during apply. (#176)
- Added diff review artifact model with inline comments, approval status, per-resource grouping,
before/after content hashes, and plan apply service integration for
plan diffandplan statusoutputs. (#303) - Added definition-of-done gating that evaluates DoD criteria before apply, blocks phase transitions when required conditions are unmet, and stores pass/fail reasoning in the plan validation summary. (#178)
- Added error recovery patterns (retry, fallback, skip, abort) with structured recovery hints in CLI error output, plan executor integration, and error recovery service for capturing error category, recovery action, and retry history. (#186)
- Hardened template rendering by replacing unsafe Jinja2 usage with a sandboxed renderer that
denies attribute access, function calls, and filters, allowing only
{var}substitution from a fixed allowlist with max template length and max output size enforcement. (#319) - Enforced explicit exception handling by introducing a
CleverAgentsErrorbase class with structured error types for configuration, provider, and file I/O failures, error code mapping, bare-except prohibition, and secret redaction in error details. (#320) - Added 32 BDD scenarios to boost unit test coverage from 97.0% to 97.2%.
- Added Behave BDD scenarios for six under-tested modules (container, correction service, plan lifecycle service, plan CLI, skill CLI, database models) to exercise uncovered lines, exception-handling paths, and partial branches. (#446)
- Fixed failing Robot Framework integration tests related to security secrets handling.
- Fixed style check violations across the codebase.
- Fixed failing unit tests.
- Added changeset persistence and diff artifact storage for tracking multi-file changes across plan execution phases. (#163)
- Added
AsyncResourceTrackerfor unified async resource lifecycle with timeout-bounded cleanup, leak detection via finalizer, and async context manager support. - Enhanced
LangGraphBridgewith graceful task cancellation that awaits in-flight tasks. - Added
StateManager.close()andA2aEventQueue.close()for proper resource disposal. - Tightened read-only enforcement: write-capable tools are now blocked on read-only plans
regardless of the tool's own
read_onlyflag. - Added
ReadOnlyViolationErrortoChangeSetCaptureto prevent write artifacts on read-only plans. - Added CLI fail-fast guards on
plan executeandplan applyfor read-only plans. - Added
DecisionServicewith record/list/tree helpers andSnapshotStorefor hash-based deduplication of context snapshots during plan execution. - Expanded CONTRIBUTING.md with detailed guidance on the issue creation process, label system, ticket lifecycle, pull request requirements, and review/merge process.
- Added commit scope, quality, and message format guidelines to CONTRIBUTING.md.
- Migrated implementation timeline from the monolithic implementation plan to
docs/timeline.md. - Migrated implementation notes to
docs/implementation-notes.md. - Relocated remaining implementation plan content to the specification and CONTRIBUTING.md,
and removed
implementation_plan.mdfrom the repository. - Updated CONTRIBUTING.md to include project-specific conventions for tooling, testing, type checking, and code style.
v1.0.0
First release.