Reformat the lint session's ruff check call in noxfile.py to a multi-line form so ruff format --check passes (the single-line form exceeded 88 chars). Add CHANGELOG.md entry under [Unreleased] ### Changed for issue #10848. ISSUES CLOSED: #10848
118 KiB
Changelog
All notable changes to this project will be documented in this file. The format follows Keep a Changelog.
- Fixed AutoDebugAgent LangGraph node contract violations (#10496):
_analyze_errornow returns a proper state update dict ({"messages": state.get("messages", []) + [new_message]}) instead of a mutated full state, preventing duplicate message accumulation when LangGraph merges state across nodes. Removes@tdd_expected_failfrom the TDD test now that the bug is fixed. Also fixestyper.Exitpropagation in actor CLI commands (actor_run.py,actor.py) so exit codes are correctly preserved through exception handler chains, and addstyper.Exitto Behave step exception handlers so test scenarios no longer error ontyper.Exitinstead of cleanly capturing the exit code. Adds BDD node-contract tests for_generate_fix,_validate_fix, and_finalize. Changedwf10_batch.robotto be less likely to create files, andplan_generation_graph.robotto give more test answers.
[Unreleased]
-
feat(a2a): A2A stdio transport for local-mode subprocess communication (#691): Implemented
A2aStdioTransportclass providing JSON-RPC 2.0 message framing over stdin/stdout for communicating with an agent subprocess in local mode. Features include process lifecycle management (connect,disconnectwith graceful shutdown via wait-then-terminate-then-kill), request/response serialization and deserialization, type-safe path resolution (Python module paths usepython -m,.pyfiles execute directly, executables run without interpreter prefix), and comprehensive error handling for subprocess lifecycle events. Added full BDD test suite covering all code paths infeatures/a2a_stdio_transport.featurewith mock-based step definitions. -
fix(a2a): .py path routing in A2aStdioTransport (#691): Corrected
connect()to use direct script execution ([sys.executable, agent_path]) for literal.pyfile paths instead of routing throughpython -m, which expects a module name. Module paths (cleveragents.*) continue to use-m; bare executables remain unchanged. -
feat(resources): resource type extension interface (#9998): New
cleveragents.resourcespackage providing the stable public API third-party developers use to add custom resource types without modifying core code. IncludesResourceTypeABC with five abstract lifecycle methods (provision,deprovision,status,validate_config,to_dict), aResourceConfigPydantic model (name,resource_type,properties), aResourceStatusStrEnum (PENDING,ACTIVE,FAILED,DEPROVISIONED), and registry functionsregister_resource_type/get_resource_type/list_resource_types. Custom types are registered under namespaced names (e.g.myorg/database); registration raisesTypeErrorfor non-ResourceTypesubclasses andValueErrorfor duplicate names. 25 BDD scenarios infeatures/resource_type_extension_interface.featurecover enum values, config instantiation, ABC enforcement, all lifecycle method return types, and registry CRUD + error paths. -
refactor(a2a): route CLI→Application communication through A2A boundary (Refs #9962, #4253): Introduced
cleveragents.shared.output_formatas a layer-neutral serialiser (format_datasupportingjson/yaml/plain/table) with no dependency oncleveragents.cli.*, eliminating a reverse dependency fromPlanApplyService.artifacts()on the CLI presentation layer. The shared formatter returns raw payloads with no CLI envelope wrapping ({"data": ..., "command": ..., "status": ...}); callers that previously parsedparsed["data"]fromapply_service.artifacts(fmt="json")output now read fields at the top level. Updatedfeatures/steps/plan_diff_artifacts_steps.py(step_artifacts_json_validation,step_artifacts_json_apply_summary) to drop the stale envelope unwrap that causedKeyError: 'data'under the new boundary. Removed stale@tdd_expected_failtag fromWF02 Mocked Generation Produces Test Artifacts Onlyinrobot/wf02_test_generation_integration.robot— the scenario now passes naturally through the A2A facade dispatch path (_cleveragents/plan/artifacts) introduced by this refactor. -
fix(test): move advanced context strategy test doubles to features/mocks (#7574): Extracted
FakeEmbeddings,RelevanceScoringStrategy,AdaptiveContextSelector,ContextFusionStrategy, and_pack_budgetfromfeatures/steps/advanced_context_strategies_steps.pyinto a newfeatures/mocks/advanced_context_strategies_mocks.pyfile per CONTRIBUTING.md mock-placement rules. Updated the Robot Framework helperrobot/helper_advanced_context_strategies.pyto import directly fromfeatures.mocksrather than manipulatingsys.pathto reach the Behave steps file. AddedNoneguard instep_assemble_context_querybefore callingselected.assemble(), and added explicitValueErrorfor unknown strategy types in bothstep_load_yaml_strategyandload_strategy_from_yaml_impl. -
fix(a2a): regression tests for stale cleveragents.acp removal (#5566): Added two Behave BDD scenarios verifying that
cleveragents.acpis not importable (raisesImportError) and thatsrc/cleveragents/acp/does not exist in the source tree. These guard against regression of the__pycache__-based import that allowed the removed ACP module to still be loaded from bytecode after the v3.6.0 rename toa2a. -
Virtual Resource Type Base Class (#8610): Implemented
VirtualResourcebase class with two example concrete implementations (MetricResource,APIEndpointResource) for abstract/computed resources that are derived rather than mapped to physical files. Virtual resources are computed on demand via acompute_fncallable. Includes Behave BDD scenarios infeatures/resource_virtual_types.featureexercising construction, computation, name validation, kwargs passthrough, exception handling, string representation, and subclassing. Resource names are validated against^[a-zA-Z][a-zA-Z0-9_-]*$(must start with a letter; alphanumeric, hyphens, and underscores otherwise). -
test(e2e): restore complete M2 acceptance test (#11191): Restored the truncated M2 full actor compiler and LLM integration e2e acceptance test to its complete 10-step form. Added dynamic LLM provider selection via
Resolve LLM Actor(falls back to Anthropic when OpenAI is unavailable or quota-exhausted), replacing hardcodedgpt-4/openai/gpt-4references in the actor config and action YAML. Added explicit return-code validation (Should Be Equal As Integers ${r_actor.rc} 0) for the actor registration step. -
docs(a2a): ACP to A2A migration guide (#10230): Added migration guide documenting how to upgrade from the ACP module to the A2A module introduced in v3.6.0, including symbol renames, field renames, operation-name mappings, and YAML configuration updates.
-
feat(plans): parallel subplan execution scheduler (#9555): Added
ParallelSubplanSchedulerwith configurablemax_parallelconcurrency control, dependency-ordered execution (SEQUENTIAL,PARALLEL,DEPENDENCY_ORDEREDmodes), fail-fast mode, per-subplan timeout enforcement, retry support, and pluggable merge strategies. The scheduler delegates execution toSubplanExecutionServiceand exposesschedule(),get_queue_status(),get_available_slots(), andcan_accept_more()APIs. Includes comprehensive BDD test coverage infeatures/parallel_subplan_scheduler.feature. -
Plan Prompt JSON Timing Field (#9353):
agents plan prompt --format jsonnow includestiming.startedas an ISO 8601 UTC timestamp in the JSON envelope, matching the spec (§CLI Commands —agents plan prompt). Extendedcleveragents.cli.formatting.format_output(and_build_envelope) with an optionalstarted_at: datetimeparameter; when provided, the envelope'stimingdict includes astartedfield alongsideduration_ms. Refactoredprompt_plan_cmdto delegate envelope construction toformat_outputso the envelope keys (command,status,data,timing.started,messages) are populated correctly at the JSON root rather than nested under a synthetic innerdatafield. -
fix(plan): NamespacedName digit-start validation (#2145, #2147):
NamespacedNamefield validators now rejectnamespaceandnamecomponents whose first character is a digit, raisingpydantic.ValidationErrorwith message"must start with a letter". BDD constructor scenarios updated to use the"a Pydantic ValidationError should be raised"step so the assertion correctly matches the exception type raised by Pydantic model construction. -
fix(cli/plan): plan correct JSON output envelope fix and BDD test coverage (#8584 / PR #8662): Restructured
agents plan correct --format jsonoutput to nest correction fields underdata.correction(e.g.,data.correction.mode) and populate the spec-required CLI envelope withcommand="plan correct",status,exit_code,timing, andmessagesfields. Added three BDD scenarios infeatures/tdd_plan_correct_json_output.featurevalidating the envelope structure for both revert and append modes. -
fix(cli): add --url flag to resource add for git resource type (#6322): Added support for the
--urlflag onagents resource add gitcommand, allowing users to specify a remote URL for git resources. The flag is validated to only apply to git resource types. Includes Behave BDD tests infeatures/resource_cli_git_url_flag.featureand Robot Framework integration tests verifying correct URL validation and CLI behavior. -
Session create JSON envelope (#6441): Fixed
agents session create --format jsonreturning a flatdatadict instead of the spec-required nested structure withdata.session,data.settings, anddata.actor_detailssub-objects. Thecommandfield is now populated correctly. Extended JSON envelope coverage toagents session list,show,delete --format json,export --output-format json, andimport --format jsonso all session commands emit a structuredmessages[].textfield ("0 sessions listed","Session details loaded","Session deleted","Export completed","Import completed"). -
fix(resources): remove unsupported executable resource type and fix resource list columns (#3077 / PR #3248): Removed
executablefromLSP_RESOURCE_TYPESandBUILTIN_TYPE_NAMES(the specification defines no such built-in type). Updatedagents resource listCLI table columns from[ID, Name, Type, Status, Kind, Location, Description]to the spec-required[Name, ID, Type, Phys/Virt, Children, Projects]. Deleted orphanedexamples/resource-types/executable.yaml. Lifecycle state for container resources is now displayed as a note below the resource table. -
fix(cli): add Read-Only and Writes columns to tool list output (#1476): Rewrote
list_tools()insrc/cleveragents/cli/commands/tool.pyto render exactly the 5 spec-required columns (Name, Type, Source, Read-Only, Writes), removed the legacy Description and Timeout columns, computes read-only/writes status fromcapabilitymetadata (rendering✓/—), and added a Summary panel showing Total, Tools, Validations, Read-Only, Writes, and Namespaces counts. Adds Behave BDD tests infeatures/tool_cli.featureverifying correct column names, capability rendering, and Summary panel presence. -
Fix actor compiler to read LSP bindings from typed
lsp_bindingfield (#1488): Fixed_extract_lsp_bindings()inactor/compiler.pyto read fromnode.lsp_binding(the typedNodeLspBindingPydantic field onNodeDefinition) as the primary path, with backward-compatible fallback to the legacylsp_bindingsconfig dict key. Per-node LSP bindings specified via thelsp_binding:YAML key are no longer silently dropped. Includes Behave BDD and Robot Framework regression tests (#1432). -
TDD regression tests for automation_profile DI bypass (#1031): Added BDD scenarios and Robot Framework integration tests verifying that
_get_service()inautomation_profile.pyresolvesAutomationProfileServicethrough the DI container rather than directly callingcreate_engineorsessionmaker. Bug #990 was fixed by PR #1181 before this TDD test PR merged; these tests serve as permanent regression guards confirming the fix remains in place. -
Added team collaboration features: multi-user connection handling with user identity tracking (TeamMember with owner/admin/member/viewer roles), role-based access control (TeamPermission with read/write/admin/manage_members), concurrent session support (SessionRegistry with thread-safe locking), and optimistic-locking conflict resolution (VersionStamp with last-writer-wins, reject, and merge strategies). Includes TeamCollaborationService orchestrating all collaboration operations. Behave BDD tests and Robot Framework integration tests included. (#863)
-
Added FastAPI-based ASGI server endpoint served by uvicorn for the CleverAgents server mode. Includes health check endpoint (
/health), A2A Agent Card discovery (/.well-known/agent.json), A2A JSON-RPC 2.0 routing (/a2a), configurable host:port binding via Settings, graceful shutdown on SIGTERM/SIGINT, andagents server startCLI command. Behave BDD tests and Robot Framework integration tests included. (#862) -
SubplanExecutionService lazy wiring in CLI (#10268): Wired
subplan_servicefrom the DI container into_get_plan_executor()soPlanExecutorcan spawn child plans during the Execute phase. WhenSubplanServiceis available butSubplanExecutionServiceis not explicitly injected,_execute_subplans()now lazily creates aSubplanExecutionServiceusing the parent plan'ssubplan_configand the_execute_child_plancallback. Added recursion guard and strategize result validation to_execute_child_planto prevent re-entrant or orphaned child plan execution. -
Actor namespace/name disambiguation (#11254): When action YAML references actors using
namespace/nameformat (e.g.strategy_actor: local/my-strategist), the_parse_actor_name()functions no longer mistake the namespace prefix for an LLM provider name. A new_is_known_provider()utility checks whether the first slash-separated segment matches a knownProviderType(e.g.openai,anthropic); if not, the input is treated as namespace/name.PlanLifecycleServicenow providesresolve_actor_provider_model()to resolve namespaced references to their underlyingprovider/modelvia the actor registry. All affected call sites —StrategyActor,LLMStrategizeActor,LLMExecuteActor, andSessionWorkflow._resolve_llm()— pre-resolve actor names before passing them to the LLM provider, fixing theValueError: Unknown provider typecrash when using namespaced actor references.
Data integrity fix: ValidationAttachmentRepository argument swap (#7492): Fixed
a critical data integrity issue in ValidationAttachmentRepository.attach where
validation_name and resource_id arguments were being silently swapped based on a
fragile heuristic ("/" in resource_id). Arguments are now passed in the correct order,
ensuring data is stored with proper parameter values.
-
Hardened the TDD bug-fix quality gate for issue #629: PR parsing now requires whole-word closing keywords (avoids false positives like "prefixes #12"), TDD bug tag discovery now uses exact token matching (avoids
@tdd_bug_42matching@tdd_bug_420), and gate evaluation now requires expected-fail tag removal to be present in the PR diff. CI integration now fetches the PR base branch for diff analysis and includestdd_quality_gateinstatus-checkrequirements for pull requests. Review-round fixes:check_expected_fail_removednow uses word-boundary matching via_contains_tag_token(avoids false positives on partial tag names); diff expected-fail removal detection now tracks flags at file level instead of per-hunk (fixes false negatives when tags span different hunks);parse_bug_refsfilters out issue number zero; redundant double error reporting eliminated; regex compilation cached vialru_cache; nox session no longer installs the full project (script uses stdlib only); CI checkout usesfetch-depth: 0for reliable merge-base resolution. Review-round 2 fixes: diff expected-fail removal detection now requires the removed line to contain both the expected-fail tag and the specific bug tag (fixes false positives when two bugs' TDD tests reside in the same file);check_expected_fail_removederror messages now use the correct tag prefix per file type (@tdd_bug_Nfor.feature,tdd_bug_Nfor.robot);boolvalues are now rejected by bug-number validation guards; file-read error handling infind_tdd_testsandcheck_expected_fail_removednow catchesUnicodeDecodeError(root-safe unreadable-file handling); temp directory cleanup added toafter_scenariohook; 8 new Behave scenarios covering bool guards, co-located bug false-positive,run_quality_gateargument validation, andmain()CLI entry point. Review-round 3 fixes: synthetic PR diff helper now auto-detects.robotvs.featurefile type and generates the matching diff format (fixes under-tested robot-format diff code path);check_expected_fail_removedtest step now filters files by bug tag viafind_tdd_testsbefore checking (matches the production code path);after_scenariotemp directory cleanup no longer setscontext.temp_dir = None(fixes cleanup conflict withcli_init_yes_flag_steps.py); 2 new Behave scenarios covering multi-line PR description parsing and non-stringpr_difftype guard. -
Added
TokenAuthMiddlewareand DI wiring to emit missing auth domain events (AUTH_SUCCESS,AUTH_FAILURE) during token checks, including spec-aligned audit details (user_identity,attempted_identity,ip_address,token_prefix,failure_reason) and best-effort publish behavior. Auth token prefixes now persist to audit logs without redaction-key collisions, and short tokens are masked (***...) to prevent full token disclosure. Added Behave coverage and Robot audit-pipeline integration tests for auth event persistence. (#714) -
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 -
fix(tui): rename ActorSelectionOverlay._render to _refresh_display (issue #11039) —
ActorSelectionOverlay._render()shadows Textual'sWidget._render()which must return aStrip. In textual >=1.0, layout callsget_content_height()self._render()getsNoneAttributeError: 'NoneType' object has no attribute 'get_height'. Renamed the method to_refresh_display()and updated all four internal call sites (show(),move_up(),move_down(),set_search()) to use the new name. -
feat(cli): implement context show and context clear CLI commands for ACMS (#9586): Added
context show <view>to display assembled context with per-tier budget utilization summary (hot/warm/cold) andcontext clearwith --path, --tag, and --tier filtering plus confirmation prompt with --yes bypass. -
Structural Component Output Validation (#8164): Replaces exact character matching with structural component checking for output validation. Implements three validators covering plan tree output, decision CLI dicts, and structured session snapshots. The
validate_plan_treefunction validates node dicts for required keys (decision_id,type,sequence,question,children), ULID format, correct types, and sibling ordering. Thevalidate_decision_dictfunction validates decision CLI output against theDecision.as_cli_dict()schema with field presence, type, ULID pattern, confidence range [0..1], and boolean field checks. Thevalidate_structured_outputfunction validates the StructuredOutput envelope forcommand,session_id(ULID), status membership,exit_code, and elements integrity. A unified dispatcher (validate_structured_component_output) enables routing by target_type. BDD test coverage added infeatures/structural_validation.feature. Epic #8137 -
Fixed
agents actor add --configcrash with nestedactors:map andconfig.actorcombined shorthand (#11189): The CLI commandagents actor add --confignow correctly parses spec-canonical YAML using the nestedactors:map format withconfig.actor: "provider/model"combined shorthand. Fixed two defects inActorConfiguration._extract_v3_actor():typeis now detected at the actor-entry level (sibling ofconfig), andconfig.actoris parsed as fallback when separateprovider/modelkeys are absent. Added validation to reject malformed combined values with empty provider or model halves. -
Fixed plan tree reporting zero decision nodes after strategize (#10813): The
plan treecommand showed nodecision_idfields even though planning completed successfully. Root cause: the PlanExecutor'srun_strategize()method produced strategy decisions via the StrategyActor but never persisted them as domainDecisionobjects through the DecisionService wiring. Addeddecision_serviceparameter to the PlanExecutor constructor, wired it from the CLI dependency-injection container in_get_plan_executor(), and added_persist_strategy_decisions()that converts each strategy decision into a domain Decision with correct type mapping (prompt_definition, strategy_choice, subplan_spawn) so they appear in plan tree output. -
task-implementorposts work-started notification comments (#11031): Both theissue_implandpr_fixprocedures now post an informational "work started" comment to the Forgejo issue/PR before beginning implementation. The comment includes the issue/PR title, procedure type, and expected duration. Posted asynchronously ("fire and move on") so it does not block the workflow. Step numbering in both procedures has been re-numbered to accommodate the new step. -
WF18 container clone e2e test: add
tdd_expected_failtag and full test body (#10815): Thewf18_container_clone.robotE2E test was missing its test body — afterSkip If No LLM Keysthe test case had no steps, but when LLM keys are present the container clone workflow caused the CLI to be killed by SIGKILL (rc=-9, OOM) in the memory-constrained CI environment. Addedtdd_expected_fail(withtdd_issue_10815) so CI correctly inverts the OOM failure to a pass until the container execution environment is tuned for CI memory limits. Also added the full WF18 test body covering all acceptance criteria: container-instance resource registration with--clone-into, two-step project creation and resource linking, action creation with trusted automation profile, and the complete plan lifecycle (use → execute → apply) with aWF18 Test Teardownkeyword for diagnostic logging on failure. -
agents session tell --formatoutputs JSON envelope (#10466): Added the--format/-fflag toagents session tell, enabling machine-readable output (JSON, YAML, plain, table) alongside the existing Rich console text. When non-rich formats are selected the response is wrapped in the spec-required JSON envelope containingcommand,status,exit_code,data,timing, andmessagesfields. The defaultrichoutput path is unchanged — no regression. -
agents session tellinvokes real LLM orchestrator actor (#5784): Replaced the M3 echo-stub with real actor invocation viaSessionWorkflow, routing throughLangChainSessionCaller→ToolCallingRuntime.run_tool_loop(). The user prompt is sent to the session's bound orchestrator actor (or--actoroverride), the assistant's response is persisted viaSessionService.append_message(), and token usage is tracked viaSessionService.update_token_usage(). Output includes a Usage panel (Rich/Plain) orusageobject (JSON/YAML) with input tokens, output tokens, estimated cost, and duration. The--streamflag produces real LLM streaming output. ASessionActorNotConfiguredErroris raised with exit code 1 when no actor is configured.
Added
- ContextStrategy Protocol and Plugin Registration System (#10590): Implemented the
ContextStrategyprotocol for pluggable context assembly strategies within the ACMS. Includes six built-in strategy implementations:SimpleKeywordStrategy(keyword matching, quality 0.3),SemanticEmbeddingStrategy(word-overlap similarity search, quality 0.6),BreadthDepthNavigatorStrategy(UKO hierarchy traversal with depth/breadth projection, quality 0.85),ARCEStrategy(multi-modal pipeline combining text/vector/graph backends, quality 0.95),TemporalArchaeologyStrategy(historical pattern discovery from cold-tier data, quality 0.5), andPlanDecisionContextStrategy(ancestor plan decision retrieval, quality 0.7). TheStrategyRegistryprovides thread-safe registration, enable/disable configuration, per-strategy timeout/fragment limits, circuit-breaker tracking, validation warnings, and plugin discovery from"module:ClassName"strings with a module-prefix allowlist for security. Seventy-seven (77) Behave scenarios cover strategy selection by confidence scoring, backend capability matching, duplicate registration rejection, stale enabled-list detection, MappingProxyType coercion validators, thread-safety under concurrent access, boundary value validation via Pydantic model constraints, and per-strategy config updates.
Added
- Automated CLI Docstring Example Validation (#9106): Added
DocstringExampleValidatorinsrc/cleveragents/cli/docstring_validator.pythat introspects Typer command signatures and validatesExamples:sections to ensure positional arguments appear before option flags. Validation runs automatically vianox -s unit_teststhrough the new Behave featurefeatures/cli_docstring_example_validation.feature. Fixedrollback_plandocstring insrc/cleveragents/cli/commands/plan.pyto show correct positional argument order. CONTRIBUTING.md updated with the required CLI docstring example style guide.
Documentation
context_tier_hydratormodule documented in ACMS architecture section (#9208): Added a new Context Tier Hydration subsection to the ACMS Architecture section of the specification (docs/specification.md), documenting thecontext_tier_hydratormodule's public interface (hydrate_tiers_for_plan,hydrate_tiers_from_project), file listing strategy (git ls-files for git-checkout, os.walk fallback), budget limits (256 KB per file, 10 MB total per project), and fragment structure (TieredFragmentwith HOT tier placement and metadata keyspath,detail_depth,relevance_score). Closes #6175.
Added
- Configurable merge strategy for plan three-way merges (#9559): Introduced
three configurable merge strategies —
prefer-parent,prefer-subplan, andmanual— allowing teams to choose their preferred conflict resolution behavior. MergeStrategy enum (StrEnum) with helper methods (is_auto_resolve(),is_manual(),from_string()), MergeStrategyService for applying strategies to resolve conflicts, comprehensive BDD test suite (8 scenarios across all three strategies), and Robot Framework integration tests verifying runtime behavior against live Python modules.
Fixed
-
fileConfig error handling in alembic env.py (#7874): Wrapped the
fileConfig()call inalembic/env.pywith atry/exceptblock that catches malformed INI logging configuration and emits a clear, user-actionable error message to stderr (including the config file path and guidance on the[loggers]section) before exiting with code 1. Includes Behave scenarios for the error-handling logic. -
agents project context showJSON/YAML output (#6323): Fixed structured output to include spec-required envelope (command,status,exit_code,data,timing,messages) and all four data sections (context_policy,limits,summarization,current_usage). Rich output now renders four panels including the newCurrent Usagepanel.
Added
-
A2A module rename BDD test suite (#8615): Comprehensive Behave tests validating that the ACP→A2A module rename is complete — verifying all 22 A2A symbols are properly exported, no legacy ACP references remain in
.pyfiles undercleveragents.a2a/, and the module docstring uses current A2A naming. The step definitions include self-contained symbol lookups to avoid cross-scenario dependency failures. -
ContextStrategy protocol and plugin registration system (#8616): Implemented the domain-model
ContextStrategyProtocol with supporting value objects (BackendSet, PlanContext, StrategyCapabilities, StrategyConfig, ContextStrategyResult, StrategyRegistryEntry). Six built-in strategies: SimpleKeywordStrategy (text search, quality 0.3), SemanticEmbeddingStrategy (vector similarity, quality 0.6), BreadthDepthNavigatorStrategy (graph-aware traversal, quality 0.85), ARCEStrategy (multi-modal pipeline, quality 0.95), TemporalArchaeologyStrategy (historical pattern discovery, quality 0.5), and PlanDecisionContextStrategy (parent/ancestor plan context, quality 0.7). The StrategyRegistry class provides registration, unregistration, query, configuration updates with Pydantic-validated fields, plugin discovery via register_from_module() with module-prefix allowlist security, per-strategy enable/disable toggling, deterministic fragment ordering, MappingProxyType-immutable config fields, thread-safe concurrent operations, and validation warnings for missing resource types or capabilities. Comprehensive BDD test coverage infeatures/context_strategies.feature(batch 1) andfeatures/context_strategy_registry.feature(registry protocol conformance, registration, query, configuration, plugin discovery, thread safety, boundary tests). Based on docs/specification.md sections 25162–25233, 28682–28708. -
Fixed
ReactiveEventBus.emit()exception handler to log the full exception message (str(exc)) and enable traceback forwarding (exc_info=True). Previously the handler logged only the exception type name (e.g. "ValueError") with no diagnostic detail, making production debugging impossible. The handler now includes the error message text and full traceback in the structlog warning entry. Removed@tdd_expected_failtag from the TDD test so both scenarios run as normal regression guards. (#988) -
pr-review-workerreview-started notification (#11028): Thefirst_reviewandre_reviewmodes now post a "review started" notification comment to the PR at the beginning of the review, giving PR authors immediate visibility that a review is in progress. Posted asynchronously so it does not block the workflow. -
Plan Rollback Command (#8557): Implemented
agents plan rollback <plan-id> [<checkpoint-id>]for checkpoint-based plan state restoration in Epic #8493. The command restores a plan's sandbox to the state captured at a given checkpoint, discarding all decisions made after that checkpoint. The checkpoint can be specified as an optional positional second argument or via the--to-checkpointnamed option. Supports--yes/-yflag to skip confirmation prompts and--format/-ffor output format selection (rich/plain/json/yaml). Included with comprehensive BDD test coverage (>= 97%) and spec-aligned output formatting showing rollback summary, changes reverted, impact analysis, and post-rollback state panels.
Changed
- Expanded ruff lint scope to cover
.opencode/(#10848): Thelintnox session now includes.opencode/as a ruff check target, ensuring Python scripts placed under.opencode/are covered by the lint gate.
Fixed
-
ACMS execute-phase assembler respects project-level hot_max_tokens (#11035): Fixed
_resolve_hot_max_tokens()to readhot_max_tokensfromcontext_policy_json["acms_config"]["hot_max_tokens"]— the correct sub-key written byagents project context set --hot-max-tokens. The previous implementation read from the top-level key (config_dict.get("hot_max_tokens")), which was alwaysNone, causing the assembler to silently fall back to the global 16K default even when a project-level override was configured. Also adds two Behave regression scenarios with@tdd_issue @tdd_issue_11035tags that exercise the DB query code path and verify the project-level budget is applied toCoreContextBudgetandContextRequest. -
Actor add
--configcrashes with combined-formatconfig.actorYAML (#11189): Fixed a bug whereagents actor add --config test/actor.yamlraisedclick.BadParameter: "provider is required"when the config file used the spec-compliant combinedconfig.actorformat (both the compact string formconfig:\n actor: "<provider>/<model>"and the nested-dict formconfig:\n actor:\n type: llm\n provider: gcp\n model: gemini). Added_detect_nested_config_actor(),_flatten_config_actor(), and corresponding handling inActorConfiguration.from_blob()to transparently flatten the nesting so downstream v3 detection, schema validation, and canonicalisation see a flat dictionary. Includes new BDD scenarios and Python unit tests. -
Guard cleanup_stale against execute/processing and execute/complete plans (#11121):
_create_sandbox_for_plan()insrc/cleveragents/cli/commands/plan.pynow skipsGitWorktreeSandbox.cleanup_stale()when the plan is inexecute/processing(execution in progress) orexecute/complete(execution finished, awaiting apply) state. Previously, re-invokingagents plan executeon a completed plan would silently destroy thecleveragents/plan-<id>git worktree branch, causingplan applyto merge zero artifacts. The guard preserves the branch per spec (§sandbox.cleanup defaults toon_apply). -
Race condition in
McpClient.start()allows concurrent double initialisation (#10438): Added_state == McpClientState.STARTINGcheck inside thethreading.RLockinstart()so that concurrent callers see the in-progress state and return immediately, preventing double initialisation of the MCP server connection, resource leaks, and state corruption. TDD regression test added with BDD scenarios covering concurrent and sequential start paths. -
Global CLI options
--data-dir,--config-path, and-vnow work correctly (#6785): These spec-required flags were absent frommain_callback()insrc/cleveragents/cli/main.py, causing any invocation with these flags to crash withNoSuchOption: No such option. All three options are now implemented per ADR-021 §Global CLI Flags and ADR-024 §Resolution Chain.--data-dirsetsCLEVERAGENTS_DATA_DIRbefore anySettings-reading code runs,--config-pathsetsCLEVERAGENTS_CONFIG_PATHforConfigServiceto pick up, and-v(repeatable count) maps to the appropriatestructloglog level. -
Add regression test for ActorRegistry.add() nested provider/model extraction (#4321): Added BDD regression test confirming that provider and model are correctly extracted from nested
actors.<name>.configblocks whentypeis only at the nested level andnameuses thelocal/namespace prefix. This scenario was previously fixed in #4300; the test ensures the fix remains in place and prevents future regressions. -
Actor configuration validation incorrectly requires top-level provider field (#4300): Actor configuration in V3 is now obtained from the nested configuration parameter, according to the specification. Removed the legacy V2 fallback support and the tests affected by that removal. Mocked existing steps to allow remaining V2 features to be covered/tested.
-
Automation profile threshold gates fully respect spec semantics (#4328): Added
_should_auto_progress_for_threshold()helper inPlanLifecycleServicethat implements the full spec Threshold Semantics:0.0= always auto,1.0= always human approval,0.0 < v < 1.0= proceed only if confidence >= threshold. Integrated withAutonomyController.should_proceed_automatically()for intermediate thresholds. Updatedshould_auto_progress(),try_auto_run(),execute_async_job(),try_auto_revert_from_apply(), andtry_auto_revert_from_execute()to use the helper. Previously the service only checked< 1.0(treated all intermediates as auto). Added BDD regression tests infeatures/tdd_automation_profile_gates_4328.featurecovering all 8 built-in profiles including thecautiousprofile's intermediate thresholds (e.g.create_tool=0.7). -
TUI Prompt Symbol Mode Awareness (#6431): The prompt widget now displays a mode-dependent symbol (
❯normal,/command,$shell,☰multi-line), implemented via_PromptSymbolMixinandInputMode.MULTILINE. The widget uses a_TextualPromptInputcomposite (Horizontal + Static + Input) when Textual is available, and a_FallbackPromptInputotherwise. Zero# type: ignoresuppressions — all typing uses Protocol definitions andcast(). -
Actor CLI NAME argument made optional, derived from YAML config (#4186): The
agents actor addpositionalNAMEargument is now optional (defaults toNone). When omitted, the actor name is derived from thenamefield in the config file. RaisesBadParameterif neither the argument nor the confignamefield is provided. Updated docstring signature toagents actor add [--config|-c <FILE>] [<NAME>]and added config-only usage examples. Added Behave scenario for theBadParametererror path (actor add without NAME and without config name field raises BadParameter) infeatures/actor_add_name_positional.featurewith corresponding step definition. Updated step definitions infeatures/steps/actor_add_update_enforcement_steps.pyandfeatures/steps/actor_add_name_positional_steps.pyto passcontext.actor_nameas a positional argument for compatibility. -
Improved parallel test suite isolation (#4186): Replaced deprecated
tempfile.mktempwithtempfile.mkstempinfeatures/environment.pyfor atomic temp file creation, eliminating TOCTOU race conditions in the per-scenario database path generation. Addedfcntl.flockfile locking to_ensure_template_db()to prevent race conditions when multiplebehave-parallelworkers attempt to create the template database simultaneously. -
Removed stale @tdd_expected_fail tags from actor add enforcement tests: The
--updateenforcement feature (#2609) was already implemented and merged but residual@tdd_expected_failtags remained on its BDD scenarios. These tags were cleaned up infeatures/actor_add_update_enforcement.featureso the tests report correctly now that the underlying bug has been fixed. -
Fixed
merge_invariants()missing ACTION scope — 4-tier precedence restored (#9126): Updatedmerge_invariants()andInvariantSet.merge()to accept a fourth parameteraction_invariantsalongside plan, project, and global tiers. The module docstring,InvariantScopedocstring, andInvariantService.get_effective_invariants()now all reflect the correct precedence chain:plan > action > project > global. Addedaction_nameparameter toget_effective_invariants()so action-scoped invariants are collected and passed through the merge pipeline instead of silently dropped. All docstrings across both files were corrected fromplan > project > globaltoplan > action > project > global. Comprehensive Behave scenarios added covering four-tier merge precedence, action-before-project ordering, action override of project with same text, and effective invariant computation with all four scopes.step texts to avoid case-sensitive collisions between different step modules that prevented all Behave tests from loading. Renamed steps in
edge_case_plan_steps.py,plan_executor_coverage_boost_steps.py,plan_explain_steps.py,plan_model_steps.py,project_repository_steps.py,service_retry_wiring_steps.py, andsession_model_steps.py. Additionally resolved a collision betweenacms_index_data_model_traversal_steps.pyandsecurity_audit_steps.pyforThen the count should be, and fixedpr_compliance_checklist_steps.pyproject-root resolution (parents[3]→parents[2]). Fixed table column-header mismatches infeatures/acms/index_data_model_and_traversal.featureand guardedcli_init_yes_flag_steps.pycleanup againstNonetemp_dir. Annotatedfeatures/architecture.feature@tdd_expected_failfor pre-existing Pydantic compliance debt inIndexEntry/ACMSIndexclasses. -
PR Review Pool Supervisor Tracking Prefix (#7891): Updated
pr-review-pool-supervisor.md,docs/development/automation-tracking.md, anddocs/development/agent-system-specification.mdto replace all occurrences of the outdatedAUTO-REV-POOLtracking prefix with the correctAUTO-REV-SUPprefix. The agent was already usingAUTO-REV-SUPin production; this change aligns the documentation with the actual runtime behaviour. -
BDD Feature File Tag Coverage (#9124): Added required
@a2a,@session, and@cliGherkin tags to all A2A, session, and CLI feature files (30 files) to enable tag-based test filtering viabehave --tags=a2a,session,cli. This restores the ability to selectively run test categories and enables CI to execute targeted test suites without running the full suite. -
Cross-actor subgraph cycle detection reads actor_ref field (#1431): Fixed
_detect_subgraph_cycles(),_map_node(), and thecompile_actor()main loop insrc/cleveragents/actor/compiler.pyto readactor_reffrom the top-levelNodeDefinition.actor_reffield instead ofnode.config.get("actor_ref", ""). Becauseactor_refis a typed, validated Pydantic field (not a key inside the untypedconfigdict), the old code always returned an empty string, causing cross-actor cycle detection to silently fail and leaving the system vulnerable to infinite recursion at runtime. Added Behave regression tests (features/actor_subgraph_cycle_detection.feature) and a Robot Framework integration test (robot/actor_compiler.robot) to prevent regressions. -
ActorLoader.list_actors TOCTOU race condition (#8588): Moved the namespace filter inside the
with self._lock:block so that the actors dictionary is read and filtered atomically. Previously an actor.clear()could run between the dictionary read and the filter step, causing the loader to return stale results or raiseRuntimeError: dictionary changed size during iteration. Added a@unit @actor @concurrencyBehave scenario infeatures/actor_loading.featurethat exerciseslist_actors(namespace=...)andclear()on multiple threads viathreading.Barrier. -
Devcontainer auto-discovery wired into
git-checkout/fs-directoryhandlers (#4740):GitCheckoutHandler.discover_children()andFsDirectoryHandler.discover_children()now calldiscover_devcontainers()after scanning forfs-directorychildren. Any.devcontainer/devcontainer.jsonor root-level.devcontainer.jsonfound at the resource location is registered as adevcontainer-instancechild resource withprovisioning_state: discovered. Named configurations (.devcontainer/<name>/devcontainer.json) are also discovered and carry the configuration name in theconfig_nameproperty. This wires the previously-isolateddiscover_devcontainers()function into the production code path, enabling the spec's zero-configuration devcontainer experience. -
Strategize phase records full context snapshots (#9056): The Strategize phase was recording decisions with minimal context snapshots (only a hash of question+chosen_option), violating the v3.2.0 acceptance criterion that decisions must include full context snapshots sufficient to replay the decision. Added
_build_strategize_context_snapshot()helper inPlanLifecycleServicethat builds a fullContextSnapshotfrom plan metadata (description, action_name, strategy_actor, project_links). Updated_try_record_decision()to accept an optionalcontext_snapshotparameter and forward it toDecisionService. Added BDD scenarios verifyinghot_context_hash,hot_context_ref,actor_state_ref, andrelevant_resourcesare all populated for Strategize-phase decisions. -
Plan tree JSON output missing
decision_idfield (#9096): Thestep_tree_json_validBDD step was asserting a raw list fromformat_output, but the function wraps all machine-readable output in a spec-required envelope dict ({"data": [...]}). Updated the assertion to validate envelope structure and removed@tdd_expected_failfrom the@tdd_issue_4254scenario so it runs as a permanent regression guard. The code producingdecision_idin tree nodes was already correct; only the test assertion needed fixing.
Documentation
- Spec clarifications: layer boundary DI exception, ULID scope, TUI/ACMS gaps (#10451): Added targeted clarifications to
docs/specification.mdincluding: the sole permitted location (application/container.py) where application layer may reference infrastructure concrete types; distinction between domain entity IDs (must be ULID) and ephemeral internal implementation IDs; per-stage protocol contracts, storage tier definitions, budget enforcement protocol, and output format for ACMS pipeline stages; and public interface definitions with verifiable checks for 8 TUI components.
Security
- PyYAML dependency pinned to secure version (#9055): Added an explicit
pyyaml>=6.0.3constraint topyproject.tomlto address CVE-2017-18342 and related advisories. PyYAML 6.x deprecated the unsafe default Loader, but downstream consumers could still invokeyaml.load()without an explicit safe Loader. A codebase-wide audit confirmed all YAML loading usesyaml.safe_load()exclusively (viacleveragents.actor.yaml_loader). Added BDD regression scenarios infeatures/pyyaml_security.featureto verify the version constraint and safe-load enforcement are maintained.
Changed
-
Fixed stale
AUTO-BUG-POOLtracking prefix references in automation-tracking.md documentation and agent-system-specification.md spec document, replaced with correctAUTO-BUG-SUPprefix used by the bug-hunt-pool-supervisor agent (#7875). -
agents session listnow displays full 26-character session ULIDs (#10970): The Rich table and Summary panel ("Most Recent" / "Oldest") previously showed only the first 8 characters of each session ULID. This made the output unusable for copy-paste intosession tell,session show,session delete, andsession export, all of which require the full 26-character identifier. The full ULID is now displayed in all output formats (Rich, plain, JSON, YAML, table). -
pr-creatornow applies State/In Review and Priority labels (#8520): Extendedpr-creatorstep 4 to apply three labels on every new PR: theType/label (from the caller'stype_labelparameter),State/In Review(always applied), and thePriority/label matching the linked issue. Updated Rule 1 to enumerate all required labels. Addresses the 53% missing-State-label rate observed across open PRs of 2026-04-13. -
Suppress passing BDD scenario output in
unit_testsby default (#10987): ImplementedPassSuppressFormatter, a custom Behave formatter (inscripts/behave_pass_suppress_formatter.py) that buffers all per-scenario output and only flushes it to stdout when a scenario fails or errors. An all-passingnox -s unit_testsrun now produces ≤ 10 lines (the summary block only), eliminating ~100,000 lines of noise that previously made CI logs unreadable. The formatter is embedded in thebehave-parallelin-process runner; coverage mode (BEHAVE_PARALLEL_COVERAGE=1) is unaffected.
Security
-
PyYAML upgraded to >=6.0.3 to address known security vulnerability (#9055): Added an explicit
pyyaml>=6.0.3dependency constraint topyproject.tomlto prevent installation of vulnerable older versions with known YAML parsing security issues. -
aiohttp upgraded to >=3.13.4 to remediate CVE-2026-34513 and CVE-2026-34515 (#1549, #1544): Added an explicit
aiohttp>=3.13.4dependency constraint topyproject.tomlto remediate two high-severity open redirect vulnerabilities. Both CVEs affect the CleverAgents platform's HTTP infrastructure including A2A server communication, tool source fetching (MCP servers, Agent Skills), and agent-to-agent protocol handlers. The version floor ensures vulnerable versions (<3.13.4) cannot be installed even if upstream transitive dependencies have loose version constraints.
Changed
-
Timeline dashboard updated with 2026-04-18 progress snapshot (#10288): Added schedule adherence tables and daily milestone snapshot for April 18, covering M3-M10 status including overdue milestones (M3-M7) and in-progress milestones (M8-M10). Risk assessment shows M6 (v3.5.0) highest risk with 1,130 open issues at 18.1% completion.
-
LSP transport header injection fix (#10608 / #7112): The
_read_one_message()method insrc/cleveragents/lsp/transport.pynow useserrors="strict"instead oferrors="replace"for ASCII decoding of LSP headers, preventing header injection attacks. Non-ASCII bytes raiseLspError. A printable-ASCII guard rejects characters outside 0x20-0x7E range. Epic #824.
Fixed
-
Concurrent ValidationPipeline stdout/stderr restoration (#7623): Fixed a race condition where concurrent
ValidationPipeline.run()calls could permanently leavesys.stdoutandsys.stderrwrapped in_ThreadLocalStreamobjects. Pipeline B could capture Pipeline A's wrapper as its "original" stream, then restore that wrapper in itsfinallyblock — permanently leaving the global streams wrapped. The fix introduces a reference-counted shared wrapper manager (_install_thread_local_streams/_release_thread_local_streams) protected by athreading.Lock. The first caller saves the true original streams and installs the wrappers; subsequent concurrent callers increment the reference count and reuse the same wrappers; the last caller restores the saved originals. Per-pipeline stdout/stderr capture remains fully isolated via thread-local buffers. -
Error suppression removed from
reactive_registry_adapter.py(#9060): Removed twotry...except Exception:blocks inregister_registry_agents()that silently suppressed errors, violating the CONTRIBUTING.md fail-fast policy. Exceptions fromactor_registry.list_actors()and the route bridge refresh now propagate to the caller instead of being swallowed. Added Behave scenarios verifying RuntimeError, AttributeError, and TypeError propagation. -
Implementation Supervisor PR Compliance Checklist (#9824): Added a mandatory 8-item PR Compliance Checklist to the worker prompt body in
implementation-supervisor.mdthat every implementation worker must complete before creating a PR. Checklist covers: CHANGELOG.md update, CONTRIBUTORS.md update, commit footer (ISSUES CLOSED: #N), CI verification, BDD tests, Epic reference, label application viaforgejo-label-manager, and milestone assignment. This eliminates systemic PR merge blockers caused by workers omitting required items. -
Implementation Pool Supervisor PR Compliance Checklist (#9824): Added a mandatory 8-item PR Compliance Checklist to the new
implementation-pool-supervisor.mdagent definition. Supervisors must enforce that workers complete all 8 checklist items (CHANGELOG.md update, CONTRIBUTORS.md update, commit footer, CI verification, BDD tests, Epic reference, label application, and milestone assignment) before creating any PR. Includes concrete markdown examples for each subsection and compliance verification pseudocode to ensure reproducible adherence. -
ACMS context path matching now handles absolute fragment paths (#10972): Fixed
_path_matches()inexecute_phase_context_assembler.pyand_matches_pattern()incontext_phase_analysis.pyto correctly match absolute paths (e.g./app/.opencode/skills/SKILL.md) against relative glob patterns (e.g..opencode/**,docs/*). PreviouslyPurePath.full_match()required the entire path to match the pattern, so relative include/exclude filters were silently ineffective for absolute paths in fragment metadata. Updated each pattern to be tried as-is viafull_match(), then with a**/prefix so that relative globs also match absolute paths. Added BDD regression tests inexecute_phase_context_assembler_coverage.featureandproject_context_phase_analysis.feature. -
Plan artifacts JSON completeness fix (#9084): Removed stale
@tdd_expected_failtags from two BDD scenarios infeatures/plan_diff_artifacts.featureand fixed test step assertions inplan_diff_artifacts_steps.pyto correctly accessvalidation_summaryandapply_summarythrough the spec-required{"data": ...}envelope returned byformat_output.
Changed
-
Restored
benchmark-regressionCI job tomaster.ymlwithpull_requesttrigger guard (if: forgejo.event_name == 'pull_request'). The job was previously absent frommaster.yml, causing benchmark regression testing to never run on PRs. The job is informational only and is not instatus-check's required needs list. (Closes #10716) -
CI coverage job now waits for unit_tests (#10714): Added
unit_teststo theneedslist of thecoveragejob inci.yml. Previously the coverage job ran in parallel with unit tests, which could produce misleading pass results when tests were still in-flight or had already failed. Coverage now only starts after unit tests succeed, eliminating redundant parallel test execution and ensuring coverage results are always meaningful. -
Bandit B608 f-string SQL in plan phases migration (#10777): Replaced f-string SQL construction in
a5_005_rebaseline_plan_phases.pywith plain string concatenation. TheINSERT INTO _v3_plans_new ... SELECT ... FROM v3_plansstatement used f-strings to interpolate_ALL_DATA_COLUMNS, which Bandit flags as B608 (SQL injection risk). The constant is hardcoded and safe, but the f-string pattern blocks tightening the bandit severity gate from HIGH to MEDIUM (issue #9945). Replaced with"INSERT INTO _v3_plans_new (" + _ALL_DATA_COLUMNS + ") " "SELECT " + _ALL_DATA_COLUMNS + " FROM v3_plans". -
Diagnostics spec examples expanded to all 9 providers (#5320): Updated the
agents diagnosticscommand examples in the specification to show all 9 supported providers (OpenAI, Anthropic, Google, Gemini, Azure, OpenRouter, Cohere, Groq, Together), matching the implementation from PR #3469. Rich, plain, JSON, and YAML example outputs now reflect comprehensive provider coverage with accurate warning counts and per-provider recommendations.
Changed
- Context Set JSON/YAML Output Structure (#6319): The
agents project context setcommand now produces spec-aligned structured output envelopes withcommand,status,exit_code,timing, and typedmessagesarrays (each containing alevelandtextfield) for both JSON and YAML formats. Adds dedicated rendering helpers (build_context_set_payload,render_context_set_plain,render_context_set_rich) insrc/cleveragents/cli/rendering/project_context_set.py.
Added
-
feat(invariants): Invariant Loading and Enforcement in Strategize Phase (#8532): Implemented invariant loading and enforcement in the Strategize phase. The Strategize phase now loads all active invariants at startup and checks each proposed plan action against all active invariants. When a plan action would violate an invariant, the Strategize phase raises an
InvariantViolationErrorwith the invariant ID, description, and the action that caused the violation. Invariants survive restarts (loaded fresh from database each run). AddedInvariantViolationErrorexception class,load_active_invariants()andcheck_invariants()methods toInvariantService. Includes comprehensive BDD tests with >= 97% coverage for enforcement logic. -
Subplan System Specification (v3.3.0) (#8725): Added comprehensive Subplan System specification to
docs/specification.md. Definescleveragents.subplansmodule boundaries, public interfaces, and forbidden dependencies. SpecifiesSubplan,SubplanResult, andSubplanTreedata models with full field definitions. Documents Describes the 8-step spawning algorithm during the Execute phase (LLM decomposition → parallel dispatch → hierarchical lifecycle → parent wait). Specifies concurrency control via per-plan semaphores (max_paralleldefault 4, max 16,fail_fastsupport). Documents integration points with Plan Executor, Three-Way Merge, Decision Recording, and Checkpoint System. Defines four error types with typed signatures for spawn, execution, concurrency, and depth-limit failures. Covers cross-cutting concerns: metrics observability, INFO-level lifecycle logging, cancellation propagation, and per-subplan timeouts (default 30 min). -
Automation Profile Precedence Chain (#8234): Implemented and validated the four-level automation profile precedence chain (plan > action > project > global) as a dedicated
automation_profile_precedencemodule. All 16 combinations of plan/action/project/global configurations are tested with BDD scenarios. Resolution chain is logged at debug level via thePrecedenceResolutiondataclass andPrecedenceSourceenum. -
Plan Tree CLI Command (#8525): Implemented
agents plan tree <plan-id>command for visualizing decision trees in the v3 plan lifecycle. The command renders a hierarchical tree structure showing decision hierarchy with per-type ordinal labeling, superseded decision filtering (via--show-superseded), depth limiting (via--depth), and multiple output formats (rich, plain, table, json, yaml). Each node displays decision ID, type, question, and chosen option. Corrected nodes are visually marked via theis_supersededflag. The command handles empty decision trees gracefully and includes ULID validation and proper error handling consistent with other plan commands. -
agents actor context clearcommand to reset actor message history and state while preserving the underlying context directory viaContextManager(#6370). -
Quick Start Guide (PR #9245): Added
docs/quickstart.mdwith an end-to-end quick start guide covering prerequisites, installation, project creation, resource registration, plan/apply workflow, and troubleshooting. Updatedmkdocs.ymlnavigation to include the Quick Start page. -
container-instance --clone-into and devcontainer-instance sandbox strategy (#7555): Added
--clone-intoCLI argument tocontainer-instanceresource type for cloning a git repository into a running container. ImplementedCloneIntoHandlerwithclone_repo_into_container()andvalidate_clone_into_url()helpers. Updateddevcontainer-instanceto usesnapshotsandbox strategy (wasnone) to enable safe plan execution inside containers. Addedcontainer-mount,container-exec-env, andcontainer-portas child types ofdevcontainer-instance. RenamedContainerLifecycleState.DETECTEDtoDISCOVERED(value:"discovered") to align with specification terminology. -
Plan checkpoint management CLI commands (#8683): Added
agents plan checkpoint-list <plan-id>andagents plan checkpoint-delete <checkpoint-id>commands. Listing output now highlights checkpoint ID, type, created timestamp, reason, phase, and decision linkage with a concise field summary footer across rich/table/json/yaml formats. Deletion supports batch IDs, interactive confirmation (skip with--yes), and structured JSON/YAML responses for automation-friendly scripting. -
Invariant Remove CLI Command (#8530): Implemented
agents invariant remove <id>command that soft-deletes an invariant by ID. The command displays a confirmation prompt before removal (bypassable with--yes/-y), outputs the removed invariant ID on success, and shows a clear error message when the invariant ID does not exist. Supports--formatflag for JSON and YAML output. Full BDD test coverage and Robot Framework integration tests included. -
TDD: plan tree does not visually mark corrected nodes (#8576): Added a failing BDD scenario proving that corrected nodes (decisions with
is_correction=True) are not visually distinguished in theagents plan treeoutput. The scenario is tagged@tdd_expected_failand will pass (by inversion) until the underlying gap described in Spec Requirement #7 is fixed. -
TDD: MCPToolAdapter.infer_resource_slots() TypeError with null properties (#10470): Added a TDD issue-capture Behave scenario that reproduces the bug where
MCPToolAdapter.infer_resource_slots()raisesTypeErrorwhen the input schema contains{"properties": None}. The test is tagged@tdd_expected_failand will pass (by inversion) until the underlying bug is fixed. -
Architecture Pool Supervisor Milestone Assignment (#7521): Added a "PR Workflow for Major Changes" section to the
architecture-pool-supervisoragent definition documenting the milestone assignment step for spec PRs. The agent now hasforgejo_update_pull_requestpermission to assign PRs to the current active milestone after creation, improving traceability of specification changes within project milestone planning. Includes BDD test coverage for the new workflow documentation and permission configuration. -
Git Worktree TOCTOU Race Condition (#7507): Fixed a Time-Of-Check-To-Time-Of-Use (TOCTOU) race condition in
git_worktree.pythat could causegit worktree addoperations to fail under concurrent execution. The fix replaces the unsafemkdtemp()+rmdir()pattern with a parent-directory approach that maintains the OS-level uniqueness guarantee throughout the entire operation. The parent temporary directory is now persisted and properly cleaned up on both success and failure paths. Comprehensive BDD test coverage validates the fix under concurrent execution and confirms proper cleanup behavior. -
Database resource types (PostgreSQL, SQLite) with transaction-based sandbox strategy (#8608): Implemented comprehensive database resource support enabling users to interact with PostgreSQL and SQLite backends through a unified resource interface. Introduces
DatabaseResourceHandlerproviding full CRUD operations (read,write,delete,list_children), connection validation with automatic credential masking via :mod:cleveragents.shared.redaction, and transaction-based sandbox strategy using BEGIN/COMMIT/ROLLBACK wrappers for safe, isolated database operations. SQLite-specific checkpoint and rollback support with SAVEPOINT semantics. Support for multiple backends (PostgreSQL, SQLite, MySQL, DuckDB) via unified "DatabaseResourceHandler" and type-specific routing. BDD test coverage infeatures/database_resources.feature(connection validation, CRUD workflows, transaction/rollback behavior, error handling, credential masking verification) and Robot Framework integration tests inrobot/database_resources.robot. -
TransactionSandbox infrastructure for database resource isolation (#8608): Implemented
TransactionSandboxclass with BEGIN/COMMIT/ROLLBACK lifecycle management for transaction-based sandbox strategy. Wired intoSandboxFactoryas the strategy resolver for database resource types. Addeddatabaseresource type registration in bootstrap builtin types and updated_resource_registry_data.pyto recognize database resource categories.
Fixed
-
UAT tester docs PR duplicate detection and examples.json conflict fix (#5768): Fixed two bugs in the
create_documentation_pr()function of the uat-tester agent that caused documentation PRs to be skipped: branch-existence guard incorrectly treated error responses as success, and open-PR duplicate check missed owner prefix. Removedupdate_examples_json()fromcreate_documentation_pr()and moved it to a single batch call after all docs PRs are created per cycle, eliminating merge conflicts onexamples.jsonwhen parallel UAT workers run simultaneously. -
invariant_enforceddecisions not propagated to child plans on subplan spawn (#9131): FixedSubplanService.spawn()to propagate allinvariant_enforceddecisions from the parent plan's decision tree to each child plan's decision tree. Previously, child plans started Strategize with a completely empty invariant set, violating the spec requirement: "recorded asinvariant_enforceddecisions that propagate to child plans." The fix adds a_propagate_invariant_decisions()helper that re-records each parentinvariant_enforceddecision on the child plan, includingnon_overridableglobal invariants. BDD regression coverage added infeatures/tdd_invariant_propagation_subplan.feature. -
fix(repositories): derive PlanResult.success from result_success column instead of error_message (#7501): Fixed a critical bug in
PlanRepository._to_domainwherePlanResult.successwas incorrectly derived fromerror_message is None. Becauseerror_messageis shared between the build phase and the result phase, a plan with a historical build error would be marked as failed even after successfully completing and being applied. The fix introduces a dedicatedresult_successboolean column in theplanstable (migrationm9_003_plan_result_success_column) and updates the repository read path to use it. For backward compatibility, whenresult_successis NULL (pre-migration records), the legacyerror_message is Noneheuristic is preserved. -
LLMTraceRepository.save()premature commit breaks UnitOfWork transactions (#7505): Replaced the unconditionalsession.commit()inLLMTraceRepository.save()with a dual-path implementation that respects the UnitOfWork (UoW) pattern. When an external session is provided (UoW mode), the method now calls onlysession.flush(), leaving transaction control to the caller. When no session is provided (standalone mode), the method creates its own session, flushes, commits, and closes it to ensure durable persistence. This eliminates three data-integrity violations: premature commit of outer UoW transactions, loss of rollback capability for subsequent failures, and a mismatch between the class docstring ("Callers are responsible for commit") and the implementation. Input validation for thetraceargument was also added. Two new BDD scenarios verify the session contract:Repository save() calls flush not commitandLLM trace rolled back when UnitOfWork transaction rolls back. -
engine_cache MEMORY_ENGINES TOCTOU Race Condition (#7566): Fixed a Time-Of-Check-To-Time-Of-Use (TOCTOU) race condition in the in-memory SQLite engine cache where two concurrent threads could both observe a cache miss on
MEMORY_ENGINESand each create a separateEngineinstance for the samesqlite:///:memory:URL, violating the single-shared-engine contract and causing duplicate database connections and inconsistent transaction state. The fix adds a module-levelMEMORY_ENGINES_LOCK: threading.Lockinengine_cache.py(exported for use by dependants) and wraps the check-and-set inUnitOfWork.enginewithwith MEMORY_ENGINES_LOCK:. Also fixed a cache-hit bug whereself._enginewas only assigned inside theif url not in MEMORY_ENGINESblock, leaving itNoneon a cache hit; the assignment is now unconditional inside thewithblock so every call that reaches the lock exits with a valid engine reference. Four new BDD scenarios infeatures/tdd_engine_cache_toctou.feature(with step definitions infeatures/steps/tdd_engine_cache_toctou_steps.py) verify lock export, cache-hit correctness, lock acquisition, and thread safety under 10 concurrent threads. -
git_tools._get_base_env() TOCTOU Race Condition (#7619): Fixed a Time-Of-Check-To-Time-Of-Use race condition in
git_tools._get_base_env()where two concurrent threads could both observe_BASE_ENV is None, both snapshotos.environ, and write potentially different snapshots. The fix adds a module-level_BASE_ENV_LOCK: threading.Lockand replaces the bareif _BASE_ENV is Noneassignment with double-checked locking: the outer check keeps the warm-cache path lock-free; the inner check insidewith _BASE_ENV_LOCKprevents duplicate initialisation on the very first concurrent call. Three new BDD scenarios infeatures/git_tools.feature(with step definitions infeatures/steps/git_tools_thread_safety_steps.py) verify caching identity, content correctness, and thread safety under 20 concurrent threads. -
Unified provider factory: eliminate divergence between
create_llm()andcreate_ai_provider()(#10949): Introduced_create_provider_instance()as the single internal factory so that both public methods delegate to one place. Creating a new provider now requires changes in exactly one method.- Fixed API key regression: the unified factory now explicitly passes
the validated API key to all LangChain constructors (OpenAI, Anthropic,
Google / Gemini, Azure, Groq, Together, Cohere, and OpenRouter). Users
who configure providers via
CLEVERAGENTS_-prefixed variables are no longer silently failed when LangChain falls back to raw environment variable lookup. Pre-validated keys are forwarded through theapi_keykwarg to avoid a second settings lookup in the factory closure. (Closes #10949) - Fixed mock provider accessibility in production:
ProviderType.MOCKis now gated by theCLEVERAGENTS_ALLOW_MOCK_PROVIDER=truesentinel environment variable. Without this flag, bothcreate_llm()andcreate_ai_provider()raiseValueErrorwhen MOCK is requested, preventing accidental or malicious use of the fake LLM in production.resolve_provider_by_name("mock")now also respects the guard andis_provider_configured(ProviderType.MOCK)returnsTrueas expected. - Fixed type annotation:
create_llm()now declares**kwargs: Anyinstead of**kwargs: object, restoring correct Pyright inference for forwarded keyword arguments.
- Fixed API key regression: the unified factory now explicitly passes
the validated API key to all LangChain constructors (OpenAI, Anthropic,
Google / Gemini, Azure, Groq, Together, Cohere, and OpenRouter). Users
who configure providers via
-
create_llm()raisesUnsupported provider type: openrouter(#10948): FixedProviderRegistry._create_provider_llm()missing anOPENROUTERbranch, which causedagents actor run openrouter/<model>to fail withValueError. Added aProviderType.OPENROUTERbranch that creates aChatOpenAIinstance configured withopenai_api_base="https://openrouter.ai/api/v1"and the OpenRouter API key, matching the behavior ofcreate_ai_provider("openrouter"). Supports optionaldefault_headerskwarg with automatic string coercion for non-string keys/values. -
LoadingThrobber Widget Restored (#6357): Restored
LoadingThrobberwidget -
Built-in actors v3 YAML format (#10883): Fixed
agents actor runfailing for built-in actors (e.g.,openai/gpt-4,anthropic/claude-3-opus) due to missing v3typefield in stored configuration.ActorRegistry.ensure_built_in_actors()now generates and persists v3 YAML text withtype: llmanddescriptionfields, ensuring built-in actors work identically to custom actors. The_generate_builtin_actor_yaml()helper creates spec-compliant YAML that passesReactiveConfigParser._is_v3_format()validation. Includes BDD scenarios and unit tests covering YAML generation, schema validation, and multiple provider handling. -
Atomic
server_connectconfig writes (#993): Fixedserver_connectincli/commands/server.pyto write all three config values (server.url,server.namespace,server.tls-verify) atomically. A snapshot of the config file is taken before any writes; if anyset_value()call fails, the snapshot is restored and compensatingCONFIG_CHANGEDevents are emitted for already-applied keys so the audit trail reflects the rollback. Addedemit_config_changed()helper toConfigServicefor decoupled event emission in rollback flows. Addedclose()method toReactiveEventBusfor proper resource cleanup in tests. Resolved merge conflict inconfig_service.pyintegrating the PR'semit_config_changed()helper with master's scoped config infrastructure. Removed# type: ignore[assignment]by introducing a typed_AutoDiscoversentinel class. BDD regression coverage infeatures/tdd_server_connect_atomic_writes.feature. -
Atomic
load_from_metadatafor Autonomy Guardrails (#7504): FixedAutonomyGuardrailService.load_from_metadata()to validate bothAutonomyGuardrailsandGuardrailAuditTrailmodels before writing either to state, ensuring atomic updates. Previously, a validation failure on the audit trail after guardrails were already written would leave the system in an inconsistent state with partial updates. The method now uses a two-phase validate-then-write approach: all model validation occurs in Phase 1, and state mutations only happen in Phase 2 after all validations succeed. -
agents actor runempty response for built-in LLM actors (#10861): Fixedresolve_config_filesincli/commands/_resolve_actor.pysilently returning empty output when invoked with a built-in actor name (e.g.anthropic/claude-sonnet-4-20250514). Built-in actors generated from the provider registry have aconfig_blobwithproviderandmodelfields but notypefield. Serialising this blob as-is produced YAML thatReactiveConfigParsercould not interpret (no agents, no routes → emptyReactiveConfig→ empty response). Fix:_synthesize_llm_yaml()now synthesises a minimal v3type: llmYAML when the actor has noyaml_textand theconfig_blobhasproviderandmodelbut notypefield, allowing the reactive config parser to create a working agent and graph route. BDD regression coverage infeatures/tdd_actor_run_response.feature. -
ReactiveConfigParser route synthesis for v3 actors (#10807): Fixed
agents actor runsilently returning empty output for v3type:llmactors._build_from_v3()and_build()now synthesise a default single-node graph route when agents are created without explicit routes, ensuringrun_single_shot()can invoke the LLM viaGraphExecutor. The nestedactors:map format also translates the v3actor: "provider/model"key into separateproviderandmodelkeys so the correct LLM provider is instantiated. -
ActorRegistry.add() spec-compliant YAML support (#4466): The registry now accepts actor YAML using the spec's
actors:map format with nestedconfig:blocks, in addition to the legacy top-levelprovider/modelformat. Theunsafeflag and graph descriptor from nested config are now correctly preserved during registration. Multi-actor YAML (>1 entry inactors:/agents:map) is now rejected byadd()with aValidationError. Nestedconfig.optionsare now correctly preserved. Theunsafecoercion now uses strictis True or == 1instead ofbool()to prevent truthy non-boolean YAML values (e.g.unsafe: "no") from being treated as unsafe. -
UKO Runtime Layer 2 (Paradigm) Indexing (#9351): Added missing
rdf:type uko-oo:Classtriple emission inPythonAnalyzer._extract_class()so that Python class definitions are now correctly classified at layer 2 (paradigm/OO) in addition to layer 3 (technology). Added the corresponding Behave scenarioIndexing a Python file populates layer 2 (paradigm)tofeatures/uko_runtime.feature, completing four-layer guarantee verification for the UKO runtime. -
Actor CLI v3 YAML Schema Support (#6283): Fixed three components to add full v3
ActorConfigSchemasupport to the actor CLI registration and execution paths.ActorConfiguration.from_blob()now detects v3 format (top-leveltypekey ofllm/graph/tool) and correctly extracts provider, model, and graph descriptors — includingtype: toolactors without amodelfield.ActorRegistry.add()validates against the full Pydantic v2 schema, persistsskills/lsp/descriptionin the config blob, and compiles graph actors with proper metadata.ReactiveConfigParser._build_from_v3()now uses correctsource/targetedge keys (fixingKeyErrorinto_graph_config()), handlesconfig: nullnodes without crashing, propagatescontext_view/memory/context/env_vars/response_format/lsp_capabilities/lsp_context_enrichmentinto agent configs, and validatesentry_nodeagainst the nodes map. Exception handling narrowed from broadexcept Exceptionto specificNotFoundErrorandActorCompilationError. v3 registration logic extracted tov3_registry.pyto keepregistry.pyunder the 500-line limit. 19 BDD scenarios cover all v3 paths including tool actors, update mode, LSP dict bindings, and field propagation. -
TDD Non-AssertionError Guard Visibility (#8294):
apply_tdd_inversioninfeatures/environment.pynow emits its non-assertion exception guard warning to both the structured logger andstderrvia a new_warning_with_stderrhelper. This makes the guard firing visible in standard Behave console output and CI log snippets where the structured logging sink may not be displayed. BDD infrastructure coverage added: a new scenario intdd_expected_fail_infrastructure.featureasserts that the warning is emitted to stderr when a non-AssertionError exception is encountered in an@tdd_expected_failscenario, and a second scenario asserts the warning is NOT emitted when the exception is anAssertionError. TheCONTRIBUTING.mdnow documents that@tdd_expected_failstep definitions must signal expected failures viaAssertionError. -
Parallel Behave Runner Log Noise Reduction (#8351): The parallel behave runner now suppresses captured stdout/stderr for passing worker chunks and only replays diagnostics for failed, errored, or crashed chunks. This makes failure output significantly easier to spot in CI and local runs. A worker crash (unhandled exception) is detected via an all-zero summary and the captured traceback is always surfaced.
-
Bug Hunt Pool Supervisor Non-Blocking Tracking: Updated
bug-hunt-pool-supervisorto make the automation tracking step non-blocking. Theautomation-tracking-managercall in step 5 is now best-effort — if it does not complete within a reasonable time or fails, the supervisor skips it and continues to the next cycle. Added explicit rule 9 clarifying that tracking must never block the main loop. Core functionality (module scanning and worker dispatch) takes priority over status reporting. -
Name Validator Server-Qualified Format (#9074): Updated actor, skill, and tool name validators to accept the spec-required
[[server:]namespace/]nameformat. Previously, server-qualified names likedev:freemo/custom-analysiswere incorrectly rejected. Added BDD scenarios for server-qualified name acceptance and rejection. All three validators (ActorConfigSchema.validate_name,NAMESPACED_NAME_RE,_TOOL_NAME_PATTERN) now correctly support optional server prefixes while maintaining backward compatibility with existingnamespace/namenames. -
Legacy CLI command removal (#4181): Removed all legacy plan lifecycle CLI commands (
tell,build,new,current,cd,continue) and their associated tests to support V3 Plan Lifecycle exclusively. RemovedtellandbuildCLI shortcuts frommain.pythat delegated to the deprecated commands. Removed orphaned_tell_streamingdead code fromplan.py. Updated help text and command validation to recognize only V3 commands. Added--formatoption toagents session tellfor consistency with other session commands. Fixed MCP logger thread-safety insession.pyusing a threading lock. Created migration guide for users transitioning from legacy to V3 workflow. -
Plan Tree JSON/YAML Command Envelope (#9163):
agents plan tree --format json/yamlnow wraps output in the spec-required command envelope withcommand,status,exit_code,data,timing, andmessagesfields. Thedatafield containsplan_id,tree,summary(nodes, depth, child_plans, invariants, superseded),child_planslist, anddecision_idsmapping. Timing now reflects actual elapsed milliseconds from command start to envelope construction. -
AutoDebugAgent Prompt Injection Mitigation (#9110): Fixed a high-severity prompt injection vulnerability in
AutoDebugAgentwhere user-providederror_messageandcode_contextfields were embedded in LLM prompts without sanitization. All three agent methods (_analyze_error,_generate_fix,_validate_fix) now sanitize user-provided content viaPromptSanitizerboundary markers before embedding in prompts.PromptInjectionDetectedexceptions are caught and handled gracefully (agent logs a warning and falls back to wrapping without injection detection, rather than crashing). Internal LLM output (error_analysis) is wrapped with boundary markers only — not subjected to injection detection — to prevent the agent from crashing on its own output. Added BDD scenarios and Robot Framework integration tests for the new behaviour. -
Automation Profile Silent Fallback (#8232):
_resolve_profile_for_planinPlanLifecycleServicenow raises a clearValidationErrorwhen a plan's automation profile name is not a known built-in profile, instead of silently falling back to"manual". Users who configured custom automation profiles (e.g."semi-auto","acme/strict") will now receive an actionable error message listing available built-in profiles. The resolved profile name is also logged at debug level for observability. -
DoD Gating in Apply Phase (#7927):
PlanLifecycleService.apply_plannow evaluates the plan'sdefinition_of_donecriteria before transitioning to the Apply phase. If any required criteria fail, aDoDGatingErroris raised and the plan remains in Execute/COMPLETE state. The evaluation result is stored inplan.validation_summarywithdod_evaluated=Trueanddod_all_passedreflecting the outcome. Plans with no DoD text skip evaluation and proceed normally.
Changed
- Configurable Agent Limits (#9246): Replaced hardcoded
deps[:10]inContextAnalysisAgentandcontexts[:5]` inPlanGenerationGraphwith configurable constructor parametersmax_dependencies(default: 10) andmax_context_files(default: 5). Non-positive values raiseValueError``. All existing call sites remain backward-compatible via default arguments.
Tests
- PureGraph BDD and Integration Test Coverage (#9601): Added comprehensive test
coverage for the PureGraph module, which previously had orphaned Behave step definitions
(
features/steps/pure_graph_coverage_steps.py) with no driving scenarios. The PureGraph scenarios (topological ordering, function execution with dependency resolution, missing function fallback behavior, and inert non-functional node handling) are wired throughfeatures/consolidated_langgraph.featureto reuse the existing step definitions without introducing a duplicate standalone feature file. Introduces Robot Framework integration tests inrobot/langgraph/pure_graph.robot(backed by therobot/langgraph/pure_graph_lib.pyPython library) exercising the PureGraph workflow end-to-end. Includes ASV benchmarks inbenchmarks/pure_graph_bench.pymeasuring execution throughput and topological ordering performance across increasing node counts (10, 50, 100, 500).
Added
-
Invariant Data Model and Database Schema (#8524): Implemented the
InvariantSQLAlchemy ORM model incleveragents.infrastructure.database.models.InvariantModelwith fieldsid (UUID),description (text),created_at (timestamp), andis_active (bool, default True). Added Alembic migrationm3_001_invariants_tablethat creates theinvariantstable with an index onis_activefor efficient active-invariant queries. Migration includes both upgrade and downgrade paths. Added BDD Behave unit tests and Robot Framework integration tests. Restored thestatus-checkCI aggregation job that was accidentally removed. -
ACMS Index Data Model and File Traversal Engine (#9579): Implements the foundational ACMS index data model with structured fields for file metadata (path, size, last modified, type), tag system, and hot/warm/cold/archive storage tier assignment. Introduces a timeout-safe large-project file traversal engine capable of handling 10,000+ files without memory exhaustion through chunked processing. Provides a complete index entry pipeline for creation, storage, and retrieval with full queryability by path, tag, type, and recency.
-
ACMS Large-Project Indexing BDD Coverage (#8726): Added 7 Behave scenarios covering walk-based indexing of 10,000+ files without timeout, binary-file skipping, oversized-file skipping, git-checkout indexing, fallback to walk when
git ls-filesis unavailable on a non-git directory, and total-bytes budget enforcement. Optimised fixture setup to pre-create subdirectories (99x fewer syscalls). Addedtimeout=120to git subprocess calls to prevent CI hangs. Cachedget_scoped_viewresults inWhensteps to avoid redundant re-queries inThensteps. -
Agent Evolution Pool Supervisor PR Metadata Assignment (#7888): The agent-evolution-pool-supervisor now automatically looks up the Type/Automation label and the earliest open milestone from the repository before dispatching improvement PR creation workers. Label and milestone IDs are passed to workers via the dispatch context, ensuring all generated improvement PRs have correct Type labels and milestone assignments. Graceful error handling skips label or milestone assignment when either is unavailable. Added comprehensive BDD test suite (7 scenarios) covering label lookup, milestone lookup, worker dispatch, PR creation with metadata, and error handling for missing labels/milestones.
-
Tool and Validation Management Showcase (#4565): Added
docs/showcase/cli-tools/tool-and-validation-management.md, a step-by-step CLI guide covering the complete lifecycle for managing tools and validations (register, list, inspect, update, remove). Demonstrates the unified registry, capability flags, validation modes and wrapped validations. Indexed the new example indocs/showcase/examples.jsonand added a callout explaining why capability flags display as(default)in the detail view. -
ACMS Context CLI Commands (
context show/context clear) (#9586): Implemented two new CLI commands for the ACMS (Advanced Context Management System).context show <view>displays assembled context with per-tier budget utilization summary (hot tier tokens vs. token budget; warm/cold tiers fragments vs. decision budget).context clearremoves context index entries filtered by--path,--tag, or--tier; supports--yesflag to bypass interactive confirmation for non-interactive/CI use. Includes full--helpdocumentation, input validation, proper error handling, Robot Framework integration tests, and ASV performance benchmarks. -
Wired
StrategyActorinto the real plan execution path:_get_plan_executorinplan.pynow resolves the strategy actor viaresolve_strategy_actor()(reading theactor.default.strategyconfig key) instead of always constructingLLMStrategizeActor.run_strategizeinPlanExecutornow passesresources(derived fromplan.project_links) andproject_contextto the actor so the LLM prompt receives full project context. Strategy decisions are serialised as JSON inplan.error_details["strategy_decisions_json"]so_build_decisionscan reconstruct the full hierarchy (dependency ordering, parent/child structure) during Execute instead of rebuilding fromdefinition_of_done.StrategizeStubActor.executeaccepts**kwargsfor forward-compatibility. Added BDD coverage for the stored-JSON path, corrupt-JSON fallback, resource-passing, and stub extra-kwargs scenarios. (#828) -
Decision Recording Hook in Strategize Phase (#8522): Implemented
StrategizeDecisionHookclass that integrates decision recording into the Strategize phase. The hook captures every decision point during strategy decomposition, including question, chosen option, alternatives considered, confidence score, rationale, and full context snapshot (hot context hash, actor state reference, relevant resources). Supports recording ofstrategy_choice,resource_selection,subplan_spawn, andinvariant_enforceddecision types. Context snapshots are auto-captured with SHA256 hashing of context data and checkpoint references for LangGraph actor state. Includes comprehensive BDD test suite with 40+ scenarios covering all decision types, context capture, error handling, and tree structure validation. -
Advanced Context Strategies Integration Tests (#10671, #7574): Comprehensive integration tests for semantic search, relevance scoring, adaptive selection, and context fusion strategies. Includes Behave feature file with 30+ scenarios, step definitions with FakeEmbeddings for deterministic testing, Robot Framework E2E tests with 20+ test cases, and helper utilities for strategy creation and budget management. All tests verify strategy selection, token budget handling, result deduplication, YAML configuration loading, ContextAssembler integration, and error/fallback behavior.
-
TDD Issue-Capture Test Activation (#7025): Replaced 234 bare
@skiptags across 82 Behave feature files with the correct@tdd_expected_fail @tdd_issue @tdd_issue_<N>tag system. Scenarios whose referenced bugs were already fixed had@tdd_expected_failremoved and now run as permanent regression guards. Net result: 629 features active in CI (up from ~545), zero@skiptags remain. -
Spec alignment for
agents project deleteoutput (#7872): Updateddocs/specification.mdto document the correct JSON/YAML output structure for the project delete command, replacing the legacydeletion_summaryobject with thedeleted,success, anddeleted_atfields that match the actual implementation introduced in PR #6639. Added BDD feature file and step definitions to validate the output format. -
Git Worktree Sandbox Apply (#4454): The
plan applycommand now merges LLM-generated changes viagit mergefrom an isolated worktree branch instead of flatshutil.copy2. Displays spec-aligned Apply Summary (plan ID, artifacts, insertions/deletions, project, timestamp), Sandbox Cleanup panel, and✓ OK Changes appliedfooter. Non-git projects fall back to the original flat file copy. -
Context Hydration Fix (#4454): Fixed
ContextFragmentmetadata types (detail_depthandrelevance_scoremust be strings, not int/float) that caused Pydantic validation errors during context assembly, resulting in the LLM receiving zero file context. -
Automation Tracking System: Replaced shared session state issue tracking with individual per-agent tracking issues. Each agent now creates its own
[AUTO-<PREFIX>]titled issues with standardized headers, reporting intervals, and health indicators. Agents:session-persister,implementation-orchestrator,system-watchdog,backlog-groomer,human-liaison. Documentation atdocs/development/automation-tracking.md. -
Automated Health Monitoring and Recovery: The
system-watchdognow runsaudit_automation_tracking_health()every 5 minutes, detecting stalled agents when tracking issues are >20% overdue from their declared reporting interval. On detection, it terminates stalled sessions via the OpenCode Server API, performs root-cause analysis, creates high-priority diagnostic issues, and closes stale tracking issues with recovery notes. -
Centralized Label Management (
forgejo-label-manager): A new specialized subagent centralizes all Forgejo label operations across the agent system. Enforces the organization-level label system, prohibits label creation, and validates label compliance. Agentsbacklog-groomer,human-liaison,project-owner,epic-planner,new-issue-creator, andissue-state-updaternow delegate all label operations to this subagent. -
PR-Issue Label Synchronization: PRs now inherit
Priority/,MoSCoW/,Points/, andState/labels from their associated issues at creation time (pr-api-creator). Thebacklog-groomeradds a continuous Pass 19 for ongoing PR-issue label synchronization. Theissue-state-updatersyncs PR state labels whenever issue states change. -
Automation Tracking Announcements: Extended
automation-tracking-managerwith announcement issue support (CREATE_ANNOUNCEMENT_ISSUE,CLOSE_ANNOUNCEMENT_ISSUE,LIST_TRACKING_ISSUES,READ_ANNOUNCEMENTS,REVIEW_OWN_ANNOUNCEMENTS). Supervisors and workers now read critical announcements before each cycle for cross-agent awareness. Priority-based filtering (Critical/High/Medium/Low) reduces noise. Backlog-groomer performs intelligent cleanup with age thresholds by priority. -
PR Agent Reorganization: All PR-related agents renamed and reorganized to follow the
*-pool-supervisornaming pattern. New agents added:pr-editor(safe PR editing with description preservation),pr-manager(unified PR interface), andpr-merge-pool-supervisor(automated PR merging supervisor). Renamed:pr-api-creatortopr-creator,pr-checkertopr-ci-test-fixer,pr-status-checkertopr-status-analyzer,pr-self-reviewertopr-reviewer,pr-fix-orchestratortopr-fix-pool-supervisor. -
Automated PR Merging (
pr-merge-pool-supervisor): New supervisor continuously monitors for merge-ready PRs and merges them automatically when all criteria are met (approvals, CI passing, no conflicts). Supports both formal reviews and comment-based approvals (LGTM, ready to merge, etc.). -
Implementation Worker Workflow Completion:
implementation-workernow implements work claiming protocols with conflict detection, comprehensive review feedback handling with intelligent parsing, sophisticated merge conflict resolution with multiple strategies, and parallel subtask execution with wave-based dependency analysis. Pass rate improved from 48.15% to 84.8%. -
Container Resource Stop Support:
agents resource stopnow correctly stopscontainer-instanceanddevcontainer-instanceresource types. -
Centralized Automation Tracking Manager (
automation-tracking-manager): The subagent is now the single interface for all tracking issue operations (CREATE_TRACKING_ISSUE,UPDATE_TRACKING_ISSUE,CLOSE_TRACKING_ISSUE,READ_TRACKING_STATE,GET_NEXT_CYCLE_NUMBER). Agents delegate to the manager rather than calling the Forgejo API directly, ensuring sequential cycle numbers across restarts, preventing duplicate issues, and enforcing consistent label application. Migrated agents includesystem-watchdog,implementation-orchestrator,timeline-updater,project-owner,product-builder,backlog-groomer,implementation-pool-supervisor,timeline-update-pool-supervisor, andproject-owner-pool-supervisor. The legacyshared/automation_tracking.mdmodule was removed. -
Documentation Writer Tracking (
docs-writer): The documentation writer now participates in the automation tracking system by creating individual[AUTO-DOCS] Documentation Report (Cycle N)issues every 10 cycles (~3.3 hours). The manager applies the mandatoryAutomation Trackinglabel automatically, while teams may add additional workflow labels as needed. Seedocs/development/automation-tracking.mdand the newdocs/development/docs-writer.mdreference. -
ACMS / UKO API Documentation (
docs/api/acms.md): Added comprehensive API reference for thecleveragents.acmspackage covering the four-layer UKO ontology hierarchy,VocabularyRegistry,ProvenanceInfo,UKOClass,UKOProperty,UKOVocabulary,Layer2Dependency,ParadigmVocabulary,DetailLevelMapBuilder, and all Layer 3 language vocabulary types (Python, TypeScript, Rust, Java). The new page is linked from the API Reference index and the MkDocs navigation. -
Comprehensive Worker Tracking System: All 16 supervisors now provide detailed visibility into worker activities and health via the OpenCode API. Enhanced
product-builder,implementation-orchestrator,continuous-pr-reviewer, anduat-testerwith detailed session monitoring, real cycle-time calculations, stale worker detection and restart, and proper tracking issue lifecycle management (delete previous, create new each cycle). Tracking now extends to previously uncovered supervisors such asarchitect,timeline-updater,docs-writer, andarchitecture-guard. -
Plan Action Argument Upsert:
PlanLifecycleServicenow upserts action arguments duringplan useto avoidUNIQUEconstraint violations when reusing actions. Includes batch-delete updates with identity-map eviction, invariants unique constraint, and an Alembic migration. (#4174)
Changed
-
product-builderWorker Allocation Tier Comments (#8169): Clarified theN_FULLtier comment to explicitly document that PR fixing is handled byimplementation-pool-supervisorvia its PR-First Priority rule. Updated theN_QUARTERcomment to enumerate the pools it covers (UAT, bug hunting, test infra). Prevents confusion about which supervisor handles PR fix work. -
Actor CLI Exception Handling Refinement (#8567):
_get_services()inactor.pynow carries an explicittuple[Any, Any | None]return type annotation._load_config_text()now catchesyaml.YAMLErrorandTypeError(instead ofValueError/AttributeError) aroundyaml.safe_load(), preserving the user-friendlytyper.BadParametermessage for malformed YAML._compute_actor_impact()defensive guards now also catchCleverAgentsError, SQLAlchemyOperationalError, andValidationErrorin addition toAttributeError/RuntimeError, keeping actor removal resilient when the database layer is unavailable. -
Decision Tree Full ULID Display (#5825): The
agents plan treecommand now displays full 26-character ULIDs for all decisions instead of truncating them to 8 characters. This enables users to copy decision IDs directly from tree output and use them in follow-up CLI commands likeagents plan correctwithout manual ID reconstruction. Added "Decision IDs (for correction)" section with human-readable labels for easy reference. Applies to both table and rich/plain text output formats. -
Automation Tracking Format: All automation tracking issues now use a standardized header format with mandatory
Reporting Interval: <interval> (Next report expected: <ts>)declarations, enabling precise staleness detection. -
PR Review Policy: Reduced PR review requirement from 2 approvals to 1. Self-approval is now permitted including for automated bot PRs. Approval can be a formal review OR an approval comment (LGTM, Approved, ready to merge).
-
Label Delegation Enforcement:
automation-tracking-managernow enforces delegation toforgejo-label-managerfor all label operations, preventing "invalid label ID" errors and ensuring label application uses correct name-to-ID mapping. -
Automation Tracking Label Guidance: Documentation now clarifies that the manager automatically applies the
Automation Trackinglabel and that additional labels such asType/Automation,State/In Progress, orPriority/Mediumremain optional workflow choices rather than mandatory. -
Automation Tracking Agent Prefix Registry: Expanded from 5 agents to 18 agents. New prefixes include
AUTO-DOCS,AUTO-REV-POOL,AUTO-UAT-POOL,AUTO-BUG-POOL,AUTO-INF-POOL,AUTO-ARCH,AUTO-EPIC,AUTO-EVLV,AUTO-GUARD,AUTO-SPEC,AUTO-TIME,AUTO-PROJ-OWN, andAUTO-PROD-BLDR. -
ACMS Context Hydration: Fixed ACMS indexing pipeline not wired into CLI —
ContextTierServicestarted empty on every CLI invocation so LLM received zero file context during plan execution. Addedcontext_tier_hydrator.pythat reads files from linked project resources (viagit ls-filesoros.walk) and stores them asTieredFragmentobjects in the tier service. Hydration runs automatically before context assembly inLLMExecuteActor.execute(). Respects max file size (256 KB), total budget (10 MB), binary file exclusion, and.git/node_modules/__pycache__directory skipping. (#1028) -
Product-Builder Tracking Migration:
product-buildernow creates individual per-cycle tracking issues (prefixAUTO-PROD-BLDR) instead of a long-running shared session state issue. Each cycle closes the previous tracking issue and creates a fresh one, providing better isolation and traceability. -
Implementation Orchestrator Scaling: Scaled to 32 parallel workers. Reduced dispatch loop sleep from 10s to 2s, simplified worker verification, reduced retry delays from 15s to 2s, and reduced idle sleep from 60s to 10s for dramatically faster throughput.
-
Specification — Validation Gate Empty-Run Guard (#8146): Updated
docs/specification.mdto document the security invariant introduced in PR #7786 (fixing issue #7508). The spec now explicitly states thatApplyValidationSummary.all_required_passedreturnsFalsewhen no validations have been run (empty summary), blocking apply. Added a prominent danger admonition block, updated the validation process results section, thefinal_validation_resultsdata model description, and two milestone acceptance criteria to reflect the corrected blocking behavior for empty validation summaries and no-attachment runs.
Fixed
-
Plan Concurrency Race Condition (#7989): Fixed critical race condition in
execute_plan()andapply_plan()where concurrent CLI/worker sessions could simultaneously modify the same plan, corrupting plan state.LockServiceis now wired into the plan lifecycle with plan-level advisory locking. Each invocation generates a unique caller identity (UUID) to prevent re-entrant lock acquisition by concurrent sessions on the same plan. Concurrent attempts now raiseLockConflictErrorinstead of silently racing. Lock is acquired before phase transition and released in afinallyblock to ensure cleanup even on error. -
--format colorANSI Output (#7910): Fixedformat_outputrouting thecolorformat option to_format_plain, which produced plain uncoloured text instead of ANSI escape sequences. Thecolorformat is now routed toformat_output_sessionwhich uses theColorMaterializerto emit proper ANSI-coloured output.--format plainand all other formats remain unaffected. -
ContextTierService Thread Safety (#7547): Added
threading.RLocktoContextTierServiceto preventRuntimeError: dictionary changed size during iterationand data corruption under concurrent plan execution. All public methods (store,get,promote,demote,evict_lru,enforce_staleness,get_metrics,get_all_fragments,get_hot_fragments,get_for_actor,get_scoped_view,get_scoped_by_resource,get_scoped_metrics) now acquire the reentrant lock before accessing the hot/warm/cold tier dicts. The service was previously documented as single-threaded but registered as a DI Singleton, causing potential data corruption when parallel subplans shared the same instance. TheTierRuntimeMixin.enforce_staleness()andScopedTierMixin.get_scoped_by_resource()/get_scoped_metrics()methods are also protected. The DI container registration asproviders.Singletonis now correct and safe. -
TOCTOU Race Condition in Git Worktree Sandbox (#7507): Fixed Time-Of-Check-To-Time-Of-Use race condition in
GitWorktreeSandbox.create()by replacing unsafe mkdtemp+rmdir pattern with persistent parent directory approach. Parent directory is now held throughout operation lifetime and properly cleaned up in all error paths (timeout, CalledProcessError, OSError) and in the cleanup() method, eliminating race window where another process could claim the worktree path. Comprehensive BDD test coverage validates the fix under concurrent execution and confirms proper cleanup behavior. -
Validation Gate Empty-Run Guard (#7508): Fixed
ApplyValidationSummary.all_required_passedreturningTruewhen zero validations were run, silently bypassing the apply gate. The property now returnsFalsewhen the validation result set is empty (is_emptyisTrue), ensuring that apply is blocked unless at least one validation was actually executed. Also addedrequired_totalproperty for completeness. Updatedconsolidated_validation.featurescenarios to reflect the corrected blocking behavior for empty summaries and no-attachment runs. -
ACMS context tier hydration:
ContextTierServiceno longer starts empty on every CLI invocation. A newcontext_tier_hydrator.pyreads files from linked project resources (viagit ls-filesoros.walk), createsTieredFragmentobjects, and stores them in the tier service before context assembly inLLMExecuteActor.execute(). The LLM now receives real file context during plan execution. Respects max file size (256 KB), total budget (10 MB), binary file exclusion, and.git/node_modules/__pycache__directory skipping. (#1028) -
Sandbox root wiring:
_get_plan_executor()now passessandbox_root=.cleveragents/sandbox/, so LLM file output (FILE:blocks) is written to disk during the execute phase. (#4222) -
SubplanExecutionService fail_fast cancellation (#7582): Fixed a race condition where already-running parallel subplans were not cancelled when
fail_fastfired. Previously,Future.cancel()only prevented queued futures from starting but had no effect on in-flight futures that completed afterstop_flagwas set -- theirCOMPLETEresults were incorrectly included in the merge output. The fix adds a post-completion guard that overrides any non-ERRORED/non-CANCELLEDresult toCANCELLEDwhenstop_flagis active, and clears the associated output to prevent it from entering the merge. Also replaces the O(n) linearstatuslookup in theas_completed()loop with an O(1)status_mapdict pre-computed before the executor block. -
JSON/YAML envelope
messages[].textcontent (#6457):agents session create,list,show,delete,export, andimportcommands now populate themessages[].textfield with human-readable text ("Session created","N sessions listed","Session details loaded","Session deleted","Export completed","Import completed") instead of the generic"ok"fallback. Theexportcommand gains--output-formatand theimportcommand gains--formatto select the output envelope format independently of the export/import file format. -
Invariant add scope enforcement (#6331):
agents invariant addnow fails when no scope flag is provided, and Robot coverage ensures the CLI surfaces the explicit error message instead of silently defaulting to global scope. -
Robot Framework TDD Listener Guards (#5436): Added three guard conditions to the
tdd_expected_fail_listenerend_test()function to prevent blindly inverting ALL test failures to passes, which was masking infrastructure errors and causing flaky CI behavior. Guards: setup/teardown error detection, non-assertion failure detection (infrastructure errors), and dry-run mode detection. Also fixedVariable Should Existsyntax errors in e2e test files and removedtdd_expected_failfrom 4 context assembly e2e tests where bugs were already fixed. -
PluginLoader entry point prefix validation (#7476): Parse entry point targets before import, enforce the module allowlist ahead of loading, and add Behave plus Robot Framework regression coverage to ensure disallowed prefixes never execute untrusted module-level code in either unit or integration flows.
-
issue-state-updaterBash Script Errors: Removed problematic bash script examples that tried to invoketask forgejo-label-manageras a bash command (the Task tool cannot be invoked from bash). Replaced with clear step-by-step operational instructions and direct label management via API. -
automation-tracking-managerLabel Delegation Syntax: Fixed incorrect delegation syntax when callingforgejo-label-manager. The manager now uses correct natural language requests (e.g., "Apply labels to issue #123: Automation Tracking") instead of structured parameters, ensuring tracking issues receive proper labels. -
product-builderMissing Supervisors: Added missingpr-fix-pool-supervisorandpr-merge-pool-supervisorto the product-builder's supervisor launch list (18 total supervisors). Updated all numeric references, pre-flight checklists, and validation logic. -
ActionRepository.update()now uses explicit bulksa_delete()+session.flush()before re-inserting child rows foraction_argumentsandaction_invariants, fixing asqlite3.IntegrityError: UNIQUE constraint failedcrash whenagents plan usewas called on an action that already had arguments registered viaaction create. (#4197) -
ACMS Indexing Pipeline CLI Wiring:
ContextTierServicewas starting empty on every CLI invocation, causing the LLM to receive zero file context during plan execution. Addedcontext_tier_hydrator.pythat reads files from linked project resources (viagit ls-filesoros.walk) and stores them asTieredFragmentobjects in the tier service. Hydration runs automatically before context assembly inLLMExecuteActor.execute(). Respects max file size (256KB), total budget (10MB), binary file exclusion, and.git/node_modules/__pycache__directory skipping. (#1028) -
CI Lint: Resolved 51 ruff violations in
scripts/validate_automation_tracking.py(import ordering, deprecatedtypinggenerics, unused imports, line-length, whitespace). -
CI Integration Tests: Removed stale
tdd_expected_failtag fromrobot/coverage_threshold.robot— the underlying bug (issue #4305) is resolved and the tag was inverting a passing test to a failure. (#5266) -
Orchestrator Worker Dispatch: Fixed
verify_worker_started()to handle the dict response format from the OpenCode API/session/statusendpoint instead of an array. Workers now dispatch and verify correctly, preventing incorrect session deletion. -
Actor compiler ignores
actor_reffield on SUBGRAPH nodes (#1429): Fixed the actor compiler (src/cleveragents/actor/compiler.py) to readactor_reffrom the top-levelNodeDefinition.actor_reffield instead ofnode.config.get("actor_ref"). Before this fix,CompiledActor.metadata.subgraph_refswas always empty andNodeConfig.subgraphon every SUBGRAPH node was alwaysNone, silently breaking all hierarchical/nested actor graph compositions. Added Behave regression tests covering subgraph compilation withactor_reffields and Robot Framework integration tests verifying thatsubgraph_refsis correctly populated after compilation. -
Resource Removal Guard (#6886): Fixed
agents resource removesilently deleting parent resources that still have linked children. The guard now queriesResourceLinkModel(the active DAG link table) instead of the legacyResourceEdgeModel, so the child-link check correctly blocks deletion.
[3.3.0] — Unreleased (Milestone: Corrections + Subplans + Checkpoints)
Status: In progress. Features documented in
docs/subplans.mdanddocs/cli.md.
Added
-
Decision Correction — Revert Mode (
agents plan correct --mode=revert): Invalidates a targeted decision and all its descendants via BFS traversal. Associated artifacts are archived and affected child plans are rolled back. The plan re-executes from the corrected decision point. Dry-run support via--dry-runshows full impact report (affected decisions, files, child plans, risk level) without making changes. -
Decision Correction — Append Mode (
agents plan correct --mode=append): Preserves the original decision and spawns a new child plan rooted at the target node. The child plan carries operator guidance (--guidance) and produces additional decisions without disturbing the existing tree. -
Correction Attempt Tracking (
CorrectionAttemptRecord): Each execution of a correction is tracked as an attempt record with full state lifecycle (pending -> executing -> complete/failed). Multiple attempts may exist per correction. Seedocs/reference/decision_correction.md. -
Subplan Execution Service (
SubplanExecutionService): Executes child plans insequential,parallel, ordependency_orderedmode. Supportsfail_fast, per-subplan timeouts, and configurable retry policies. -
Subplan Merge Service (
SubplanMergeService): Merges child plan sandbox outputs usinggit_three_way,sequential_apply,fail_on_conflict, orlast_winsstrategies. -
Checkpoint and Rollback (
agents plan rollback <plan_id> <checkpoint_id>): Operators can restore sandbox state to any previously captured checkpoint. Rollback is blocked for plans in theappliedterminal state or with cleaned-up sandboxes. Seedocs/reference/checkpointing.md. -
Automatic Checkpoint Triggers: The execution engine now creates checkpoints automatically on
on_tool_write,on_tool_write_complete,on_subplan_spawn, andon_errortriggers. Configurable viacore.checkpoints.auto_create_on. -
Documentation: Added
docs/subplans.md(subplans and checkpoints guide) and extendeddocs/cli.mdwith all v3.3.0 CLI commands.
[3.2.0] — Unreleased (Milestone: Decisions + Validations + Invariants)
Status: In progress. Features documented in
docs/decisions.mdanddocs/cli.md.
Added
-
Decision Recording: Every choice point in a plan's lifecycle is recorded as a persistent
Decisionnode in a tree. Decisions capture the question, chosen option, alternatives considered, confidence score, rationale, actor reasoning, and a context snapshot for replay. 11 decision types cover all phases of plan execution. Seedocs/reference/decision_model.md. -
Decision Service (
DecisionService): Application-layer interface for recording decisions, retrieving decision histories, managing context snapshots, and performing tree operations (BFS traversal, path-to-root). Supports both in-memory and persisted modes. Seedocs/reference/decision_service.md. -
Decision Tree Visualization (
agents plan tree <plan_id>): Renders the decision tree for a plan as a visual hierarchy. Supports--show-supersededto include corrected decisions and--depthto limit tree depth. -
Decision Explain (
agents plan explain <decision_id>): Shows detailed information about a single decision node including alternatives, context snapshot, and actor reasoning. Supports--show-contextand--show-reasoning. -
Invariant System (
agents invariant add/list/remove): Natural-language constraints that govern plan execution. Invariants are scoped toGLOBAL,PROJECT,ACTION, orPLANlevel with a defined precedence hierarchy. The Invariant Reconciliation Actor evaluates all invariants at the start of the Strategize phase and recordsinvariant_enforceddecisions. Seedocs/reference/invariants.md. -
Invariant Violation Model: When an invariant is violated, an
InvariantViolationis created witherror,warning, orinfoseverity. Reconciliation failures block phase transitions withReconciliationBlockedError. -
Documentation: Added
docs/decisions.md(decision system guide) anddocs/cli.md(v3.2.0 and v3.3.0 CLI command reference).
Fixed
- CLI (
agents actor remove) (#6491): Restores output parity with the other actor commands by honoring--format/-ffor JSON/YAML/plain/Rich envelopes. Adds a Robot Framework regression test to assert the JSON envelope structure and updates the CLI synopsis indocs/specification.mdto document the option.
[3.8.0] -- 2026-04-05
Added
-
Wired Invariant Reconciliation Actor auto-invocation into
PlanLifecycleServicephase transitions (start_strategize,execute_plan,apply_plan). Reconciliation failures now block the transition withReconciliationBlockedErrorand emitINVARIANT_VIOLATEDevents. Post-correction reconciliation runs viaCORRECTION_APPLIEDevent subscription (best-effort). AddedInvariantServiceSingleton provider in the DI container. -
TUI -- Shell danger detection: The TUI shell mode (
!prefix) now detects dangerous command patterns before execution. A configurable pattern registry classifies commands by danger level (warning, critical) and surfaces a user warning overlay before proceeding. Patterns cover destructive filesystem operations, privilege escalation, network exfiltration, and more. (#1003) -
TUI -- Permission Question Widget: A new inline
PermissionQuestionWidgetrenders permission requests directly in the conversation stream for single-key operations. Users can allow/reject with single-key shortcuts (a/A/r/R), navigate with arrow keys, confirm withEnter, or pressvto open the full permission dialog. (#1003)