700 Commits

Author SHA1 Message Date
brent.edwards 479c275c9d test(e2e): verify M2 success criteria — actor compiler and tool routing v3.1.0 2026-02-25 04:51:15 +00:00
mngrif 7ec06d5db8 Merge pull request 'asv runners have the same machine name now' (#388) from mngrif-asv-test into master
Reviewed-on: cleveragents/cleveragents-core#388
Reviewed-by: Brent Edwards <brent.edwards@cleverthis.com>
2026-02-24 21:51:41 +00:00
mngrif 4e750b9b87 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
mngrif 800835f6a0 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
mngrif 57ff467321 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
mngrif 5f76637b21 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
mngrif ce4bbd4303 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
mngrif 8105117c10 asv runners have the same machine name now 2026-02-24 20:48:41 +00:00
freemo 25c571541f feat(skill): integrate agent skills discovery
Add agent skills discovery system that scans configurable filesystem
paths for Agent Skills Standard folders (containing SKILL.md with YAML
front-matter) and registers them as tools in ToolRegistry.

Core implementation:
- New skills/discovery.py module with path parsing, directory scanning,
  SKILL.md front-matter parsing, ToolSpec building, and registration
  with configurable conflict handling (skip/error/replace strategies)
- Config key skills.agent_skills_paths for comma-separated discovery paths
- ToolSpec extended with source and source_metadata fields for provenance
- ToolRegistry.list_tools() gains source filter parameter
- SkillRegistryService rewritten with discover_and_register() and
  refresh_agent_skills() hooks for on-demand re-scanning
- CLI "agents skill tools" command updated with --refresh flag and
  source metadata in JSON output

Testing:
- 27 Behave scenarios covering config key, path parsing, discovery,
  ToolSpec building, registration, conflict handling, refresh, edge
  cases (invalid YAML, empty front-matter, non-dict YAML, empty
  descriptions, noop handler), and source metadata
- 10 Robot Framework integration tests for end-to-end discovery flow
- ASV benchmarks for discovery scan performance overhead

Documentation:
- docs/reference/skill_registry.md updated with Agent Skills Discovery
  section covering config, algorithm, SKILL.md format, conflict
  handling, refresh hook, CLI output, and service API

ISSUES CLOSED: #161
2026-02-24 19:41:29 +00:00
freemo f7993d7309 feat(cli): align actor commands to YAML
Align actor add/remove/list/show commands to YAML-first configs,
namespaced names, and --format json|yaml|plain output support.

Changes:
- Add --format option to list, show, add, and update commands
- Add --update flag to add command for updating existing actors
- Add _actor_spec_dict helper for structured output serialization
- Update _print_actor to support format_output rendering
- Add Behave feature tests for CLI format scenarios (11 scenarios)
- Add Robot Framework integration test for show output fields
- Add ASV benchmark for actor CLI parsing overhead
- Add CLI reference documentation for actor commands

ISSUES CLOSED: #288
2026-02-24 19:12:01 +00:00
brent.edwards df6e0f9e48 Merge pull request 'fix/database-parallelism' (#410) from fix/database-parallelism into master
Reviewed-on: cleveragents/cleveragents-core#410
Reviewed-by: Luis Mendes <luis.mendes@cleverthis.com>
2026-02-24 19:06:37 +00:00
brent.edwards aa06b7aa37 Merge branch 'master' into fix/database-parallelism 2026-02-24 18:33:45 +00:00
freemo c47e6445d0 feat(actor): compile hierarchical actor configs to LangGraph
Add ActorCompiler module that translates GRAPH-type ActorConfigSchema
definitions into LangGraph NodeConfig/Edge structures with LSP binding
metadata. Includes subgraph resolution with cross-actor cycle detection,
entry/exit validation, and CompilationMetadata for diagnostics.

New files:
- src/cleveragents/actor/compiler.py: Core compiler with compile_actor()
- features/actor_compiler.feature: 13 Behave scenarios
- features/steps/actor_compiler_steps.py: Step definitions
- robot/actor_compiler.robot: 4 Robot smoke tests
- benchmarks/actor_compiler_bench.py: ASV performance benchmarks
- docs/reference/actor_compiler.md: Compilation pipeline reference

Modified:
- src/cleveragents/actor/__init__.py: Export compiler types
- vulture_whitelist.py: Whitelist new public API

ISSUES CLOSED: #158
2026-02-24 17:57:18 +00:00
freemo 55aee7cf22 fix(test): commit after each add_skill to prevent session GC rollback, and improved coverage.
The step_register_skills_table step called add_skill in a loop but only
committed once at the end. Because SkillRepository.create() obtains a
new session per call and only flushes (never commits), the intermediate
sessions could be garbage-collected before the final commit, rolling
back their transactions on the shared SQLite :memory: connection. Moving
_commit_pending inside the loop ensures each skill is durably committed
before the next session is created.

ISSUES CLOSED: #418
2026-02-24 12:19:04 -05:00
freemo 23aa4280f2 Docs: fixed table values in timeline 2026-02-24 12:16:28 -05:00
brent.edwards c402e6402b Merge branch 'master' into fix/database-parallelism 2026-02-24 16:02:53 +00:00
freemo aa008ba5d7 feat(cli): add action and plan CLI extensions
Add extended CLI flags and output rendering for plan and action
commands in the v3 plan lifecycle.

Plan use command:
- --automation-profile flag validates against BUILTIN_PROFILES and
  persists to plan metadata with PLAN provenance
- --invariant flag (repeatable) passes PlanInvariant objects with
  InvariantSource.PLAN to PlanLifecycleService.use_action()
- --strategy-actor, --execution-actor, --estimation-actor, and
  --invariant-actor flags validate namespace/name format via
  validate_namespaced_actor() before setting on the plan

Plan status/list output:
- Profile and Invariants columns added to plan status summary table
- Profile and Invariants columns added to lifecycle-list table
- _plan_spec_dict includes estimation_actor, invariant_actor, and
  invariants fields in all output formats (json, yaml, plain, table)
- _print_lifecycle_plan rich panel displays invariants with source
  provenance tags

Action show output:
- _print_action displays estimation_actor, invariant_actor,
  invariants list, inputs_schema, and automation_profile when present
- _action_spec_dict conditionally includes estimation_actor,
  invariant_actor, and inputs_schema fields

Documentation:
- docs/reference/plan_cli.md documents all extended flags, actor
  override validation, and usage examples
- docs/reference/action_cli.md documents extended output fields and
  YAML configuration options

Tests:
- 29 Behave scenarios in features/cli_extensions.feature covering
  automation profile, invariant flags, actor override validation,
  plan status/list rendering, and action show extended fields
- 5 Robot Framework integration tests in robot/cli_extensions.robot
  for plan use with invariants, profiles, and actor validation
- 6 ASV benchmark suites in benchmarks/cli_extensions_bench.py
  measuring parsing overhead for all new flags and rendering paths

ISSUES CLOSED: #325
2026-02-24 13:41:11 +00:00
freemo 5c66d718aa Docs: Fixed bad formatting in implementation timeline documentation 2026-02-24 02:06:53 -05:00
freemo b1637eb02e Docs: Daily timeline update 2026-02-23 22:52:28 -05:00
freemo 417d17478f Docs: Explicitly indicated dependency direction for blocking characteristics in CONTRIBUTING.md 2026-02-23 21:58:34 -05:00
freemo 67b4ddf5f8 Docs: Removed implementation-notes and migrated that information as comments on tickets 2026-02-23 21:48:07 -05:00
freemo b1bf2250fb Docs: Switched back to using QOTO's kroki. 2026-02-23 20:17:18 -05:00
freemo d9a492c3ff docs: add missing reference pages to mkdocs navigation
Added decision_model, resource_handlers, and resources to the manually-authored
reference page nav entries in gen_ref_pages.py so mkdocs no longer warns about
pages existing in docs/reference/ but not included in the nav.

Refs: #408
2026-02-24 01:15:26 +00:00
freemo a7c51ed78c docs: clarify branch/tag ref rules for development vs non-development issues
Refined the branch/tag (Ref) field requirement: development issues (features,
fixes, chores) must set it to the same branch as the one in the Metadata
section once the issue reaches State/In Progress, and must always reference a
branch not a tag. Non-development issues (bug reports, questions, support)
may leave it blank or optionally point to the branch or tag being referenced.

Refs: #408
2026-02-24 01:07:55 +00:00
freemo 0d5e97ff62 docs: require branch/tag ref field on all issues in contributing guidelines
Added requirement that every issue must have its Forgejo branch/tag (Ref) field
set to the working branch once work begins. This field is separate from the
branch name in the issue body Metadata section but must match it. Setting the
field allows Forgejo to associate issues with branches in its UI.

Refs: #408
2026-02-24 01:03:49 +00:00
freemo bdda79f24b docs: add PR description and dependency link requirements to contributing guidelines
Added explicit requirement that every PR must include a detailed description
with a summary, closing keywords for linked issues, and a Forgejo dependency
link. Updated the merge checklist with PR description and dependency link
verification items. Reworked PR Process item 1 to be comprehensive about
both the description body and the issue linkage.

Refs: #408
2026-02-24 00:59:09 +00:00
freemo 31094b20b9 docs: add milestone and PR label requirements to contributing guidelines
Added milestone requirements: issues beyond State/Unverified must be assigned
to a milestone; PRs must be assigned to the same milestone as their linked
issues. Added PR label rules: every PR must carry exactly one Type/ label
matching the nature of the change. Updated the triaging checklist to include
milestone assignment and updated the merge checklist with milestone and label
verification items.

Refs: #408
2026-02-24 00:51:56 +00:00
brent.edwards dd963daeaa Merge branch 'master' into fix/database-parallelism 2026-02-24 00:45:01 +00:00
brent.edwards f2b9ccfde4 fix(test): isolate parallel behave subprocesses with per-scenario temp databases
Each behave-parallel worker previously resolved to the same file-based
SQLite database (cleveragents.db or .cleveragents/db.sqlite) because
before_scenario removed the CLEVERAGENTS_DATABASE_URL env var and the
fallback paths are shared across processes.  Under parallel execution
this caused intermittent 'database is locked' and duplicate-project
errors—most visibly in the coverage_report nox session.

Replace the env-var removal in before_scenario with unique temp database
paths via tempfile.mktemp(), giving every scenario its own isolated
database file.  Temp files are cleaned up in after_scenario.

Also fix cli_streaming_steps.py where a Background + duplicate Given
sequence triggered a duplicate project name collision, and update
coverage_boost_steps.py so Settings-default assertions explicitly clear
the env vars before testing pydantic defaults.
2026-02-24 00:41:01 +00:00
freemo ccff33c7c7 docs: update changelog with documentation reorganization entries
Added an Unreleased section to CHANGELOG.md describing all documentation
changes in this branch: CONTRIBUTING.md expansion, implementation plan
migration to docs/timeline.md and docs/implementation-notes.md, and
removal of the monolithic implementation_plan.md.

Refs: #408
2026-02-24 00:29:53 +00:00
freemo 87d842732b docs: Clarified metadata on CONTRIBUTING.md
Refs: #408
2026-02-23 19:25:12 -05:00
freemo 9563da6485 docs: Fixed broken image link in CONTRIBUTING.md
Refs: #408
2026-02-23 19:21:25 -05:00
freemo 96516f4944 docs: Expanded the CONTRIBUTING.md document to give more details to the process of contributing issues, and pull requests
Refs: #408
2026-02-23 19:16:17 -05:00
freemo 09c2567d60 docs: Moved the last elements from implementation plan to their respective locations and deleted the plan from the repo
Refs: #408
2026-02-23 17:53:26 -05:00
freemo fb7b20bd6b docs: Moved the notes taken during implementation to its own document
Refs: #408
2026-02-23 17:53:02 -05:00
freemo 69b99d49e6 docs: Moved the implementation timeline out to its own document
Refs: #408
2026-02-23 17:52:59 -05:00
freemo 9559414dc2 docs: Added commit guidlines to the contributing document
Refs: #408
2026-02-23 17:52:56 -05:00
freemo e53c301ab6 docs: Updated CONTRIBUTING.md to be inclusive of everything relevant from the implementation plan
Refs: #408
2026-02-23 17:52:50 -05:00
hamza.khyari 88f1a1264b Merge pull request 'develop-hamza-2' (#385) from develop-hamza-2 into master
Reviewed-on: cleveragents/cleveragents-core#385
2026-02-23 22:44:38 +00:00
khyari hamza 2c46a0be5a revert(test): remove StaticPool from skill registry in-memory db
Reverts the StaticPool fix (68bc068) as it is no longer needed on
develop-hamza-2. Restores the original SingletonThreadPool default
for sqlite:///:memory: engine creation.
2026-02-23 22:20:44 +00:00
khyari hamza e880aa13d9 docs(plan): check off M3.1 quality gates for PR #128 2026-02-23 22:20:44 +00:00
khyari hamza bd58cc04f4 docs(plan): check off M3.1 decision-domain tasks from merged PR #128 2026-02-23 22:20:44 +00:00
khyari hamza 1eb028402c fix(test): use StaticPool for skill registry in-memory db
The default SingletonThreadPool for sqlite:///:memory: can
non-deterministically lose flushed data when multiple sessions are
created without closing (as in the bulk-register table step).
Under CI with coverage --parallel-mode and behave-parallel --processes 32,
this caused list_all() to return 2 skills instead of 3.

StaticPool guarantees all sessions share the exact same DBAPI connection,
which is the SQLAlchemy-recommended pattern for :memory: test databases.
2026-02-23 22:20:44 +00:00
khyari hamza 1a0a501f66 refactor(resource): address PR review feedback for handler runtime
- extract BaseResourceHandler to eliminate ~90% duplication between
  GitCheckoutHandler and FsDirectoryHandler
- raise RuntimeError when sandbox.context is None instead of silent
  empty string fallback
- add threading.Lock to resolver handler cache for thread safety
- type resource_lookup/type_lookup as Callable instead of Any
- log original HandlerResolutionError at DEBUG before fallback
- use behave.runner.Context in step definitions per repo convention
2026-02-23 22:20:44 +00:00
khyari hamza bfc6ab0fb1 feat(resource): add handler runtime for git-checkout and fs-directory 2026-02-23 22:20:44 +00:00
khyari hamza 832fe369fe refactor(benchmark): clean up resource registry bench per review
- remove unused imports (UTC, datetime, ResourceKind, SandboxStrategy)
- remove dead code (_bench_ulid, _CB32, _BENCH_CTR)
- use StaticPool for in-memory SQLite consistency
2026-02-23 22:20:44 +00:00
khyari hamza 78213084ae feat(resource): add resource registry and DAG metadata 2026-02-23 22:20:44 +00:00
khyari hamza 91f1a3d1eb chore: add worktrees/ to gitignore 2026-02-23 22:20:03 +00:00
khyari hamza 229dbc8925 refactor(decision): address PR review feedback
- add with_superseded_by() helper for frozen model mutation
- document frozen model + superseded_by interaction in docstring
- clarify sequence_number uniqueness is a persistence concern
- add scenario for invalid corrects_decision_id ULID validation
- add scenario for with_superseded_by copy behavior
- type step helper dict as dict[str, Any]
2026-02-23 22:20:03 +00:00
khyari hamza abcfba7e66 feat(decision): add decision domain and context snapshots 2026-02-23 22:19:19 +00:00