Adds missing CLI flags to `resource add`, `resource list`, `resource tree`, `resource type list`, and `lsp list` per specification.
Changes:
- Added --update, --clone-into to resource_add; expanded --mount for devcontainer-instance
- Added --all to resource_list; changed --depth default to 3
- Added [REGEX] positional to type_list and lsp list
- Added include_auto_discovered parameter to resource registry ops
- 12 new BDD scenarios with step definitions
- Fixed critical bug: clone-into URL parsing used split() instead of rsplit(), causing HTTPS URLs to be stored with incorrect data
Closes#904
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
The ACP module was properly renamed to A2A in commit ec0b7631 (closing #688),
but the deprecated src/cleveragents/acp/ path was not explicitly excluded from
version control. While __pycache__/ and *.py[cod] are already gitignored
globally, add an explicit .gitignore entry for the deprecated acp/ package path
to prevent accidental re-introduction and document the deprecation per ADR-047.
Verification performed:
- Confirmed src/cleveragents/acp/ does not exist in git (only __pycache__
artifacts remain on developer machines as untracked build artifacts)
- Confirmed zero tracked .pyc files across the entire repository
- Confirmed zero imports referencing cleveragents.acp in source, test, and
configuration files
- Confirmed no orphaned .pyc files exist without corresponding .py sources
- All nox sessions pass (coverage: 98.7%)
ISSUES CLOSED: #947
Add 8 BDD scenarios in features/fast_init_upgrade.feature that directly
exercise the _fast_init_or_upgrade closure installed by
_install_template_db_patch in features/environment.py.
Scenarios cover all code paths:
- Non-empty DB with matching prefix → early return (original NOT invoked)
- Non-existent DB with matching prefix → template copied (original NOT invoked)
- Existing empty DB with matching prefix → template copied (original NOT invoked)
- Non-matching prefix → delegates to original init_or_upgrade
- In-memory SQLite → delegates to original init_or_upgrade
- Non-SQLite URL → delegates to original init_or_upgrade
- Bare sqlite:// URL → delegates to original init_or_upgrade
- Delegation forwards runner instance and keyword arguments correctly
Test infrastructure:
- features/mocks/fast_init_test_helpers.py provides a context manager
(patch_original_init_or_upgrade) that replaces the _original_init_or_upgrade
reference inside the closure via cell_contents manipulation, enabling
precise call-tracking without recreating the function under test.
- All scenarios tagged @mock_only to skip unnecessary DB setup.
- Cleanup registered via context._cleanup_handlers for temp file removal.
- Works in both sequential and parallel execution modes.
Review fix round:
- Added bare sqlite:// URL scenario covering the second branch of the
in-memory disjunction (L1).
- Added scenario verifying runner instance and keyword argument forwarding
through the delegation path (L2, L3).
- Replaced hardcoded test credentials with clearly synthetic pattern (I4).
- Fixed CHANGELOG wording that incorrectly claimed mktemp replacement (L5).
ISSUES CLOSED: #733
Add a dedicated TUI help overlay toggled by F1 and resolve its content from the current prompt mode for main-screen, slash-command, reference, and shell contexts.
Extend Behave and Robot coverage for the new help-panel widget, app wiring, context switching, and toggle behavior.
ISSUES CLOSED: #1013
Add content_hash(resource, *, algorithm='sha256') -> str to the
ResourceHandler protocol and all handler implementations:
- Protocol: new content_hash method on ResourceHandler (protocol.py)
- BaseResourceHandler: default impl hashes file content or directory
entry names; returns EMPTY_CONTENT_HASH sentinel for missing
resources
- GitCheckoutHandler: hashes git rev-parse HEAD through the requested
algorithm for consistent digest format
- FsDirectoryHandler: recursive walk hashing sorted relative paths
and file contents (content-only, ignores metadata)
- DevcontainerHandler: hashes devcontainer.json config file
- DatabaseResourceHandler: hashes connection string; for SQLite
file-based DBs, hashes the database file content
- _DefaultHandler: delegates to BaseResourceHandler
EMPTY_CONTENT_HASH sentinel is the SHA-256 of empty input
(e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855).
Hash algorithm is configurable via the algorithm parameter (default
sha256, accepts any hashlib.new()-compatible name).
Behave tests (10 scenarios): sentinel for missing/nonexistent,
determinism, different content produces different hash, fs-directory
recursive hash with change detection, git-checkout hash, configurable
algorithm (sha256 vs sha512), protocol compliance for all 4 handlers.
ISSUES CLOSED: #837
Add a specification-aligned slash command catalog and wire it into TUI overlay initialization so command discovery reflects the complete command surface. Cover command and group cardinality plus representative command presence in Behave tests.
ISSUES CLOSED: #1002
Add a production skeleton compressor that re-renders inherited fragments to overview depths via the UKO detail-level map chain, fits the result within the configured skeleton budget, and wires the pipeline default to the new compressor.
Address prior review feedback by extracting the render visitors into a dedicated module, restoring projected metadata to native runtime types, constraining builtin component resolution with an allowlist, and keeping child-context inheritance compatible with CRP context fragments for the Robot integration path.
Reproduced the Forgejo lint job in a clean python:3.13-slim container with the CI commands All checks passed! and 1740 files already formatted; both passed, so the earlier lint failure appears to have been transient runner behavior rather than a source-level defect.
ISSUES CLOSED: #919
## Summary
- Fix automation profile resolution precedence at plan-creation time to follow plan > action > project > global.
- Narrow exception handling in `_resolve_plan_profile_ref` to catch only `(KeyError, ValueError, OSError)` with warning-level structured logging, replacing bare `except Exception:` per CONTRIBUTING.md §Exception Propagation.
- Fix TDD feature file tag/title inconsistency: align to `@tdd_bug @tdd_bug_1076` / "TDD Bug #1076" referencing the original bug ticket.
- Add BDD scenarios for plan-level profile override and config service error fallback.
- Harden lifecycle and Robot/Behave test paths for auto-progression and parallel CI stability (including pre-seeded DB initialization for `tdd_plan_explain_plan_id` helper).
- Update Robot helper timing/session patterns to reduce false negatives in long-running integration/E2E validations.
## Approach
The automation profile resolution is implemented in `PlanLifecycleService._resolve_plan_profile_ref`, which evaluates the four-level precedence chain (plan > action > project > global) at `use_action()` time. The resolved profile is stored as an `AutomationProfileRef` on the Plan with provenance tracking. The `ConfigService` is used for project-scoped and global config lookups, with narrowed exception handling that logs warnings on failure and falls back to the settings default.
## Validation
- `nox -s lint` ✅
- `nox -s typecheck` ✅
- `nox -s unit_tests` ✅
- `nox -s coverage_report` ✅ (97%)
## Review Fix Round (Review #2963)
1. **Bare `except Exception:` → narrowed to `(KeyError, ValueError, OSError)` with warning logging** — addresses CONTRIBUTING.md §Exception Propagation violation
2. **Tag inconsistency fixed** — `@tdd_bug @tdd_bug_1076` with title "TDD Bug #1076"
3. **Added 2 new BDD scenarios** — plan-level override and config error fallback
4. **Rebased onto latest master** (532ea100)
Closes#854
Reviewed-on: cleveragents/cleveragents-core#1196
Co-authored-by: Brent Edwards <brent.edwards@cleverthis.com>
Co-committed-by: Brent Edwards <brent.edwards@cleverthis.com>
## Summary
Add M6 parallel-scaling coverage for 10+ concurrent subplans:
- **15-subplan parallel scenario** with explicit peak-concurrency bound checks (`max_parallel=10`) and thread-safe concurrency tracking via `_build_executor()`.
- **Deep hierarchical decomposition** coverage (4+ levels) with adjusted leaf condition that only stops early when hitting `max_depth` or when the workset is trivially small (`min_files_per_subplan`).
- **Non-progress guard** in `_build_hierarchy` to prevent pathological recursion when clustering cannot meaningfully split the file set.
- **Small-project regression test** (< 50 files) verifying decomposition depth does not increase unexpectedly with the relaxed leaf condition.
- **ASV benchmark** for 15-subplan parallel execution with `max_parallel=10` to track scaling behavior.
### Removed from this PR
The `_build_hierarchy` child-linkage correctness fix (returning `node_id` from recursive calls instead of using `nodes[-1].node_id`) has been **removed** per review feedback — it is a separate bug fix and will be submitted as an independent issue/PR per CONTRIBUTING.md §Atomic Commits.
## Approach
- **Concurrency tracking:** The `_build_executor()` closure in step definitions detects `context.concurrency_counter` / `context.concurrency_lock` and performs thread-safe peak tracking in a try/finally block.
- **Leaf condition:** Replaced the `max_files_per_subplan` / `max_tokens_per_subplan` leaf check with a `min_files_per_subplan` check to allow deeper decomposition for large projects. Added a non-progress guard so clustering that cannot split the file set terminates immediately rather than recursing to `max_depth`.
- **Deterministic IDs:** `_ids_for_count()` preserves legacy fixed IDs for the first 5 subplans and generates additional deterministic IDs for scale scenarios.
## Validation
### Passing
- `nox -s lint` — all checks passed
- `nox -s typecheck` — 0 errors, 0 warnings
- `nox -s unit_tests` — 12,988 scenarios passed, 0 failed
- `nox -s coverage_report` — 97% (passes `--fail-under=97`)
Closes#855
Reviewed-on: cleveragents/cleveragents-core#1201
Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Add Behave feature/step pairs that exercise uncovered branches across handlers, LSP, CLI, and service layers to reach the coverage gate.
ISSUES CLOSED: #1232
## Summary
Fixes the Docker build failure at step 30/30:
```
fatal: not a git repository (or any of the parent directories): .git
```
## Root Cause
`.dockerignore` excludes `.git/`, so `COPY . $APP_DIR` never copies the `.git` directory into the image. However, the final `RUN` step unconditionally runs `git clean -xdf`, which requires a git repository to exist.
## Fix
Wrapped `git clean -xdf` and `rm -rf .git` in a conditional that checks for `.git` directory existence first, falling through silently when absent:
```dockerfile
([ -d .git ] && git clean -xdf && rm -rf .git || true)
```
This makes the Dockerfile work correctly whether `.git` is present (e.g., if `.dockerignore` is modified) or absent (current behavior).
## Quality Gates
| Gate | Result |
|------|--------|
| lint | Pass |
| typecheck | Pass (0 errors) |
| pre-commit hooks | Pass |
(Dockerfile-only change — no Python code modified, so unit/integration tests are unaffected.)
Closes#1233
Reviewed-on: cleveragents/cleveragents-core#1234
Reviewed-by: Luis Mendes <luis.mendes@cleverthis.com>
Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Thread plan_env and project_env through the tool execution chain so
the ExecutionEnvironmentResolver receives project-level execution
environment values stored in ContextConfig.execution_environment.
The resolver's precedence logic (tool > plan > project > default) was
already correct, but callers never passed project_env — tools always
fell through to the global HOST default, ignoring project-level
overrides entirely.
Changes:
- PlanExecutionContext: add plan_env and project_env fields + properties
- ToolCallRouter: accept plan_env/project_env in constructor, pass to
runner.execute() in route() and route_streaming()
- ToolCallingRuntime: accept plan_env/project_env, pass to
runner.execute() in the direct-runner fallback path
- Update monkey-patched execute stubs in tool_router_steps.py to accept
explicit plan_env/project_env keyword arguments
- Add 4 BDD scenarios proving plan_env/project_env reach the resolver
via ToolCallRouter (project-only, plan-only, both, neither)
Dependency: requires PR #1135 to be merged first (adds CLI flag and
persistence for project-level execution-env-priority).
Closes#1080
ISSUES CLOSED: #1080
Robot Framework integration test suite for Specification Workflow Example 5:
Database Schema Migration with Safety Nets. Exercises the review automation
profile with custom resource types, custom skills with database tools,
phased child plan execution, checkpointing, and rollback.
- 7 test cases covering: custom resource type registration, review profile
behavior, custom skill with 3 database tools, action creation with
review profile, checkpoint/rollback via managers, 5-phase sequential
SubplanService.spawn with fail-fast, and plan lifecycle through
strategize-to-execute
- Uses mocked LLM providers (CLEVERAGENTS_TESTING_USE_MOCK_AI=true)
- All Run Process calls have timeout=60s on_timeout=kill
- Fix environment-dependent test failures: mock shutil.disk_usage in
disk space and diagnostics --check Behave steps so tests pass
regardless of CI runner disk space; Robot diagnostics test tolerates
disk-space errors
ISSUES CLOSED: #769
## Summary
- tighten `plan correct` active-plan fallback so it only runs for isolated `CLEVERAGENTS_HOME` mismatch cases and never when explicit DB env overrides are configured
- narrow fallback exception handling in `_resolve_active_plan_id()` to expected DB/path/service failures; unexpected errors now surface instead of being silently swallowed
- add BDD regression coverage for both safeguards in `features/consolidated_plan_misc.feature` + `features/steps/plan_cli_legacy_r2_steps.py`
## Validation
- `nox -e lint`: PASS
- `nox -e typecheck`: PASS
- `nox -e unit_tests`: PASS
- `nox -e integration_tests`: FAIL in current branch baseline (29 failing Robot integration tests in this environment)
- `nox -e e2e_tests`: FAIL in current branch baseline (45 failing E2E tests in this environment)
- `nox -e coverage_report`: PASS (97%)
Closes#1025
Reviewed-on: cleveragents/cleveragents-core#1184
Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com>
Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Aligned v3_plans table with specification DDL:
1. Added effective_profile_snapshot column (TEXT NOT NULL) for
storing frozen JSON snapshot of automation profile at plan
creation time. Added Pydantic field_validator ensuring the
value is well-formed JSON. Validator catches RecursionError
for deeply nested JSON, consistent with automation_profile
deserialization hardening. Validator error message uses
length-only to avoid potential information disclosure.
Documented that the default "{}" exists for backward
compatibility; new plans should explicitly set the snapshot.
2. Made root_plan_id NOT NULL — root plans self-reference their
own plan_id, child plans reference the root ancestor. Added
explicit ondelete="RESTRICT" FK policy for consistency with
other FKs in the model. Documented known FK policy drift
between ORM model (RESTRICT) and migrated databases (retained
SET NULL) in the migration; data integrity is preserved by
the NOT NULL constraint regardless. Moved root_plan_id
self-reference resolution into a PlanIdentity model_validator
so the domain model is consistent with the DB NOT NULL
constraint before and after persistence (previously the
resolution only happened in from_domain(), creating an
asymmetry where root_plan_id was None in-memory but non-null
after round-tripping through the database).
3. Made automation_profile NOT NULL with default "balanced".
4. Documented intentional deviation: phase default is "action"
(code) vs "strategize" (spec) because the Action phase was
added as a pre-Strategize setup step.
5. Created Alembic migration with backfill logic for existing
rows. Root-ancestor backfill uses level-by-level propagation
with a parent-readiness guard to correctly resolve plans at
arbitrary hierarchy depth (3+ levels). Added safety bound
(max 100 iterations) with logged error on exhaustion to guard
against cycles in parent_plan_id. Merged batch_alter_table
operations to avoid redundant full-table copies in SQLite
batch mode. Migration backfill also handles empty-string
automation_profile values. Documented downgrade limitation
(backfill is not reversible). Orphan-row fallback now logs
affected row count at WARNING level. Migration cycle-detection
now logs affected plan_id values before the orphan fallback
overwrites them. All migration SQL uses sa.text() for
consistency with SQLAlchemy best practices.
6. Hardened automation_profile deserialization in to_domain() to
catch ValueError (invalid StrEnum provenance), Pydantic
ValidationError, and RecursionError (deeply nested JSON) in
addition to JSONDecodeError and KeyError, preventing
unreadable plans from corrupted DB rows. Applied the same
defensive deserialization pattern to effective_profile_snapshot
in to_domain(): corrupted JSON falls back to '{}' with a
WARNING log instead of crashing the read path. Added TypeError
to the effective_profile_snapshot exception list in to_domain()
for consistency with the Pydantic validator. Logging of
unparseable values uses length only to avoid potential
information disclosure.
7. Used explicit None check (is not None) instead of truthiness
for root_plan_id resolution in from_domain(), for
effective_profile_snapshot in to_domain(), and in
_serialize_automation_profile() for consistency.
8. Documented intentional column naming conventions vs spec DDL
(e.g. automation_profile vs automation_profile_name, *_actor
vs *_actor_name, processing_state vs state, v3_plans vs
plans). Documented the semantic difference: automation_profile
stores either a bare name or structured JSON with provenance,
whereas the spec automation_profile_name stores a plain name.
9. Fixed benchmark plan constructors
(plan_phase_migration_bench.py) that were missing the now-
required root_plan_id and effective_profile_snapshot fields.
10. Replaced defensive getattr() with direct attribute access for
effective_profile_snapshot in from_domain() and update(),
since the field is now defined on the Plan domain model.
11. Fixed Any type annotation in test helper _make_plan() to use
AutomationProfileRef | None for proper type safety.
12. Added BDD scenarios for PlanIdentity self-reference
resolution, NULL effective_profile_snapshot constraint
enforcement, valid-JSON-missing-profile_name-key
deserialization, invalid-JSON and empty-string snapshot
rejection by Pydantic validator, and corrupted
effective_profile_snapshot DB fallback in to_domain().
13. Extracted default automation profile name to a module-level
constant (DEFAULT_AUTOMATION_PROFILE) to reduce sentinel
duplication across models.py and repositories.py.
14. Centralised automation-profile serialisation into
LifecyclePlanModel._serialize_automation_profile() to
eliminate duplication between from_domain() and
LifecyclePlanRepository.update().
15. Fixed to_domain() root_plan_id type cast from str | None
to str, reflecting the NOT NULL column constraint.
16. Added PlanIdentity model_validator that resolves None
root_plan_id to plan_id at domain construction time, ensuring
the domain model honours the spec DDL NOT NULL constraint
regardless of persistence state. Simplified from_domain()
root resolution accordingly.
ISSUES CLOSED: #921
Implement three-scope configuration resolution (local > project > global)
with deep merge. Add ConfigScope enum, project-root discovery, and
config.local.toml file support.
Changes:
- Add LOCAL to ConfigLevel enum and new ConfigScope enum (GLOBAL, PROJECT, LOCAL)
- Implement discover_project_root() walking up from CWD for cleveragents.toml/.cleveragents
- Implement config.local.toml file loading in ConfigService
- Implement three-scope deep merge via _deep_merge() helper
- Add read_project_config(), read_local_config(), read_merged_config() methods
- Add write_scoped_config() for writing to any scope file
- Update set_value() to accept optional scope parameter
- Update resolve() with six-level precedence chain (CLI > env > local > project > global > default)
- Update CLI config set with --scope flag (global/project/local)
- Add config.local.toml to .gitignore and DEFAULT_IGNORE_PATTERNS
- Add Behave BDD scenarios for three-scope resolution, deep merge, and project-root discovery
ISSUES CLOSED: #937
Implement the full correction-checkpoint rollback pipeline:
- Workspace snapshots: CheckpointService.create_workspace_snapshot()
creates diff-based checkpoints before decision execution, storing
only changed file paths in metadata.extra["diff_paths"]
- CorrectionService.revert_decisions(): new high-level entry point
that creates a correction, computes impact, invokes checkpoint
rollback, and archives artifacts in a single call
- Physical artifact archival: CheckpointService.archive_artifacts()
moves files to .cleveragents/archived_artifacts/ instead of just
flagging metadata. CorrectionService._archive_decision_artifacts()
delegates to this during revert execution
- Selective rollback: CheckpointService.selective_rollback() wraps
rollback_to_checkpoint with atomic semantics — captures HEAD before
rollback and recovers on failure
- Diff-based storage: _compute_diff_snapshot() computes changed paths
between checkpoints via git diff; snapshots store diff manifest and
SHA-256 hash in metadata
- CLI: plan rollback now accepts --to-checkpoint <id> in addition to
the positional checkpoint_id argument; uses selective_rollback for
atomic execution
- DI wiring: Container now injects checkpoint_service into
CorrectionService; CLI correct command uses container-provided
service instead of ad-hoc instance (fixes bug #986)
- Checkpoint model: pre_decision added to allowed checkpoint_type
values
- TDD: Removed @tdd_expected_fail from wiring test feature since the
DI bug is now fixed
ISSUES CLOSED: #943
Implement LiveMaterializationStrategy as the third materialization
strategy type (alongside sequential_buffer and accumulate) per spec
§26456-26492. The live strategy renders element updates in-place at
~15 fps by tracking a dirty-element set and coalescing updates into
frame redraws.
RichMaterializer now extends LiveMaterializationStrategy instead of
_BaseBufferStrategy, enabling supports_incremental_updates=True.
Element rendering still delegates to the colour renderer for visual
formatting, maintaining backward compatibility.
Changes:
- Add _LiveMaterializationStrategy class with frame-rate throttling,
dirty-element tracking, and per-frame composition in declaration
order
- Update RichMaterializer to extend _LiveMaterializationStrategy
- Export LiveMaterializationStrategy from materializers.py and
__init__.py
- Update SD-2 and SD-7 documentation in __init__.py
- Add vulture whitelist entry for LiveMaterializationStrategy
- Add 5 Behave scenarios covering live strategy rendering, incremental
update support, dirty-element coalescing, all-element-type rendering,
and frame rate validation
- Add step definitions for the new scenarios
ISSUES CLOSED: #903
Implement three new actor context subcommands as specified in the v3
CLI specification:
- `agents actor context remove [--yes|-y] (--all|-a|<NAME>)`:
Remove a named context or all contexts with interactive confirmation.
Supports --all for bulk removal and --yes to skip prompts.
- `agents actor context export (--output|-o) <FILE> <NAME>`:
Export a named context to JSON or YAML (detected from file extension).
Includes sha256 integrity checksum in output metadata.
- `agents actor context import [--update] (--input|-i) <FILE> [<NAME>]`:
Import a context from JSON or YAML. Name is inferred from file metadata
if omitted. Refuses to overwrite existing contexts unless --update is
specified.
All commands:
- Support 6 output formats (json, yaml, plain, table, rich, color) via
the shared format_output framework
- Use ContextManager for persistence (messages, metadata, state,
global_context)
- Follow existing error handling patterns (typer.Exit for user errors)
- Are wired as `agents actor context` subcommand group via add_typer
New files:
- src/cleveragents/cli/commands/actor_context.py (command module)
- features/actor_context_cmds.feature (Behave BDD scenarios)
- features/steps/actor_context_cmds_steps.py (BDD step definitions)
- robot/actor_context_export_import.robot (Robot integration test)
ISSUES CLOSED: #869
Remove the <NAME> positional argument from `actor add` command. The actor
name is now derived from the `name` field inside the config YAML file, per
the specification: `agents actor add (--config|-c) <FILE> [--update]`.
Updated all BDD and integration tests to pass name via config file.
ISSUES CLOSED: #914
Align the structured output envelope (JSON/YAML modes) with the specification:
add `status` field, rename `elements` to `data`, rename `metadata` to
`messages`, and fix the fallback chain to include the table step
(rich→table→color→plain).
ISSUES CLOSED: #884
Add the missing --depth-gradient repeatable flag to `project context set`
per specification. The flag accepts HOP:INT_OR_NAME format to control
context detail depth degradation with graph distance. Parsing validates
hop as integer and value as integer or recognized detail level name.
ISSUES CLOSED: #889
Add --execution-env-priority flag to 'project context set' command,
enabling project-level execution environment priority per spec WF17.
- Add execution_env_priority field to ContextConfig domain model
- Validate flag value against ExecutionEnvPriority enum (fallback/override)
- Persist in context_policy_json, preserving existing execution_environment
- Display in 'project context show' Execution Environment section
- Merge with existing blob to avoid overwriting previously set fields
Tests: 9 Behave scenarios, 26 steps.
ISSUES CLOSED: #1079
Add FAISS-backed ACMS read and write adapters on top of the shared VectorStoreService, wire them through the DI container, and cover indexing, scoped search, removal, and benchmark behavior with Behave and ASV.
Address review feedback by keeping the commit scoped to the FAISS backend work and replacing the loose vector-store cache typing with explicit FAISS store protocols instead of Any.
ISSUES CLOSED: #871
Renamed all 11 task-type confidence threshold fields in AutomationProfile
from phase-transition semantics to spec-defined task-type semantics.
Updated all 8 built-in profiles, CLI formatting, YAML schema, services,
and all Behave/Robot tests referencing the old field names.
Post-review fixes:
- Fixed 24 stale old field names in M6 fixture files
(automation_profiles.json, autonomy_guardrails.json)
- Added model_validator(mode='before') to detect legacy field names
and raise actionable ValueError with rename mapping
- Added semantic bridge comments in PlanLifecycleService mapping
task-type thresholds to phase-transition gates
- Added threshold_field to structured log messages for observability
- Restored categorised CLI automation-profile show output to match
spec (Phase Transitions / Decision Automation / Self-Repair /
Execution Controls) instead of flat list
- Added missing access_network field to spec show output examples
(Rich, Plain, JSON, YAML variants)
- Aligned ADR-017 profile fields table to all 11 fields with
descriptions matching spec Automatable Tasks table
- Aligned automation_profiles.md threshold descriptions with spec
- Added spec section references in phase_reversion.md, error_recovery.md,
and plan_execute.md for field naming context
- Extended repository roundtrip test to assert all 11 threshold fields
- Fixed benchmark _make_profile() passing safety fields as top-level
kwargs instead of via SafetyProfile sub-model (incompatible with
extra="forbid")
- Aligned CLI JSON/YAML output structure for automation-profile show
with the specification grouped format (phase_transitions,
decision_automation, self_repair, execution_controls)
- Moved safety boolean fields into the Execution Controls section
of Rich output per spec examples
- Reverted auto profile description to "Fully automatic except apply"
per specification (line 16703, line 28406)
- Improved bridge comments in test steps with semantic context for
threshold-to-gate mappings
ISSUES CLOSED: #902