Commit Graph

412 Commits

Author SHA1 Message Date
freemo 5190108c35 feat(cli): add tool and validation commands 2026-02-18 10:50:13 +00:00
freemo 2c8c6283f0 Fix: Minor linting issue 2026-02-18 00:18:12 -05:00
freemo 24b475dcec Docs: Normalized ADRs 2026-02-18 00:09:51 -05:00
freemo b587c3315f Docs: Resolved docs warnings 2026-02-18 00:09:50 -05:00
freemo 0c7bfb1ae9 Tests: Fixed lint error 2026-02-17 23:34:16 -05:00
freemo b2c3c08415 Tests: Fixed broken tests 2026-02-17 22:59:16 -05:00
freemo 77a0a95dc3 Tests: Added coverage to get us to 97% 2026-02-17 21:00:05 -05:00
freemo 4cda00abf6 Build: configured coverage report to run in parallal, removed cap on number of parallel processes, limited by number of cores of env variable 2026-02-17 21:00:02 -05:00
freemo 2a84341753 Docs: Updated implementation plan 2026-02-17 20:59:54 -05:00
freemo 79f91c51b1 Tests: ensuring tests have coverage and work. 2026-02-17 20:55:49 -05:00
freemo a4db605e1c feat(tool): add resource binding resolution 2026-02-17 20:55:46 -05:00
freemo a8558f13ca feat(cli): add project context commands 2026-02-17 20:55:43 -05:00
freemo 08639183e2 feat(resource): add DAG linking and discovery 2026-02-17 20:55:32 -05:00
freemo 3b005ddcd4 feat(service): resolve automation profiles with precedence 2026-02-17 20:18:18 -05:00
freemo 7e7d2e7727 feat(execute): add changeset model and change capture 2026-02-17 20:18:15 -05:00
freemo be4d32d550 feat(tool): add tool registry persistence 2026-02-17 20:18:04 -05:00
freemo 5480cd36fd feat(project): add context policy model 2026-02-17 20:07:38 -05:00
freemo 9464ec6285 feat(domain): add automation profile model and built-ins 2026-02-17 20:07:34 -05:00
freemo 093204a703 feat(resource): add fs-mount and fs-directory types 2026-02-17 20:07:31 -05:00
freemo 02d384d209 fix(lint): narrow docstring tables to 88-char line limit
Fix 25 E501 line-too-long violations in RST/markdown docstring tables
across resource.py, tool.py, models.py, and lifecycle.py. Also fix
invalid test expectation in project_commands_coverage.feature where
project list with no database was expected to abort but now succeeds
with an empty list after the redesign.
2026-02-17 20:07:26 -05:00
freemo 740e08b2a4 Docs: Updated ADRs and specification to include details about standards 2026-02-17 19:31:27 -05:00
brent.edwards 08c911a41d Merge pull request 'feature/m3-actor-schema-examples' (#93) from feature/m3-actor-schema-examples into master
Reviewed-on: cleveragents/cleveragents-core#93
2026-02-17 22:31:32 +00:00
brent.edwards b9984cac57 Merge branch 'master' into feature/m3-actor-schema-examples 2026-02-17 12:58:19 -08:00
brent.edwards 8386ce0f76 Merge pull request 'feat(tool): add tool registry persistence' (#80) from feature/m3-tool-registry into master
Reviewed-on: cleveragents/cleveragents-core#80
2026-02-17 20:50:32 +00:00
brent.edwards bc5fa83d06 Merge branch 'master' into feature/m3-actor-schema-examples 2026-02-17 12:41:17 -08:00
CoreRasurae 798db9088e feat(tool): add tool registry persistence 2026-02-17 20:28:20 +00:00
brent.edwards 767d9d0f82 Merge pull request 'test(cov): Fix coverage test failures' (#94) from fix/behave_tests_coverage into master
Reviewed-on: cleveragents/cleveragents-core#94
2026-02-17 19:04:45 +00:00
brent.edwards 7538add6bb fix: merge with master to fix lint 2026-02-17 18:45:55 +00:00
CoreRasurae ef905baff6 test(cov): Fix coverage test failures 2026-02-17 16:40:18 +00:00
brent.edwards 1f8760f94a Merge pull request 'fix(test): correct project list scenario that expected abort on empty db' (#90) from fix/project-list-test into master
Reviewed-on: cleveragents/cleveragents-core#90
2026-02-17 16:04:05 +00:00
khyari hamza 46f697bd95 fix(test): add temp directory and DB bootstrap to project list scenario
The 'Test project list command with no projects' scenario was missing a
Given step to set up a writable working directory. Without it, the
container fell back to CWD/.cleveragents/db.sqlite which could not be
opened (directory did not exist), causing sqlite3.OperationalError.

- Add 'Given I have a temporary working directory' to the scenario
- Bootstrap the SQLite schema in the When step so the ns_projects table
  exists for the empty-list query
2026-02-17 14:40:16 +00:00
aditya 6a84132078 fix(actor): fix actor schema validation and tests
Fix issues identified during test execution:

- Improve name validation to reject multiple slashes and empty parts
- Fix conditional routing YAML to include all exit nodes
- Fix QuotedString parse type to standard quoted format
- Fix line length in error message (split across lines)
- All 47 Behave scenarios pass (0 failures)
- All Robot Framework integration tests pass (283 passed, 3 skipped)
- All ASV benchmarks execute successfully

Part 12 (bugfix) of C1.schema implementation.
2026-02-17 14:31:11 +00:00
aditya a5a134826e docs(actor): add C1.schema implementation notes and development log
Add comprehensive documentation for C1.schema task:

- Notes section in Implementation Checklist with design decisions
- Development Log entry with full implementation summary
- Traceability for all deliverables (code, docs, tests, benchmarks)
- Quality metrics and next steps documented
- Complete file/line number references for all artifacts

Part 11 (final) of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 14:09:53 +00:00
khyari hamza 4ba714c389 style: shorten docstring markdown tables to satisfy E501 (88 cols) 2026-02-17 14:04:24 +00:00
aditya 419168fd95 perf(actor): add ASV benchmarks for actor schema
Add performance benchmarks for actor schema operations:

- Minimal/full LLM actor parsing benchmarks
- Tool actor validation benchmarks
- Simple/complex graph topology validation (cycle detection)
- File I/O operations (load/save YAML)
- Serialization benchmarks (model_dump)

Part 10 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 13:54:27 +00:00
aditya 1f05648b2a test(actor): add Robot Framework integration tests for actor schema
Add Robot Framework smoke tests for actor schema validation:

- Valid actor tests: All 5 example YAMLs (LLM, tool, graph actors)
- Invalid name tests: Missing namespace validation
- Invalid LLM tests: Missing model field validation
- Invalid TOOL tests: Missing tools field validation
- Invalid GRAPH tests: Missing route and duplicate node IDs
- Helper script: CLI interface for schema validation from Robot

Part 9 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 13:46:04 +00:00
aditya 1049634d0d test(actor): add Behave step definitions for actor schema
Add step definitions for 50+ test scenarios:

- Given steps: YAML templates for LLM/TOOL/GRAPH actors and invalid configs
- When steps: Schema validation from string/file and YAML I/O
- Then steps: Assertions for validation, fields, collections, and errors
- Test data: Minimal and complex configurations for all scenarios
- Full coverage: All actor types, graph topologies, and error cases

Part 8 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 13:43:07 +00:00
aditya 9ca1ceea49 test(actor): add comprehensive Behave scenarios for actor schema
Add 50+ Behave test scenarios covering all validation rules:

Valid Scenarios (20):
- LLM actors (minimal, with prompt, tools, memory, context)
- TOOL actors (minimal, inline definitions)
- GRAPH actors (linear, conditional, subgraphs)
- All example YAML files (simple_llm, llm_with_tools, etc.)
- Context views (strategist, executor, reviewer, full)
- Memory configurations
- Environment variables

Invalid Name Scenarios (4):
- Missing namespace
- Multiple slashes
- Empty namespace
- Empty name

Invalid LLM/TOOL/GRAPH Scenarios (7):
- LLM without model
- TOOL without tools
- TOOL with empty tools list
- GRAPH without model
- GRAPH without route

Graph Topology Validation (6):
- Duplicate node IDs
- Invalid entry node
- Invalid exit nodes
- Invalid edge references (from_node, to_node)
- Cyclic graphs

Tool/Node Validation (3):
- Inline tool without namespace
- Invalid parameter names
- Invalid node ID formats

Additional Scenarios (10):
- YAML I/O (save/reload, missing files)
- Edge priorities
- Memory configurations (disabled, limits, summarization)

Part 7 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 13:34:48 +00:00
aditya 411bc3325f docs(actor): add comprehensive actor schema reference documentation
Add complete reference documentation for actor YAML schema:

Documentation Sections:
- Actor types overview (LLM, TOOL, GRAPH)
- Complete field definitions for all models
- Tool node semantics (references vs inline definitions)
- Graph constraints and topology rules
- Comprehensive validation rules with examples
- Error messages with causes and fixes

Field Definitions:
- Top-level actor fields (name, type, model, etc.)
- ToolParameter and ToolDefinition fields
- MemoryConfig and ContextConfigSchema fields
- ContextView enum (strategist, executor, reviewer, full)

Graph Documentation:
- Node types (AGENT, TOOL, CONDITIONAL, SUBGRAPH)
- Edge definition and conditional routing
- RouteDefinition structure
- Cycle detection explanation

Validation Rules:
1. Unique node IDs
2. Entry node existence
3. Exit nodes existence
4. Edge reference validity
5. Acyclic graph requirement
6. Node reachability

Examples:
- Simple LLM actor
- LLM with inline tools
- Simple graph workflow
- Complex graph with conditionals
- Error examples with fixes

Part 6 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 13:26:15 +00:00
khyari hamza 4d63b5af7e fix(test): correct project list scenario that expected abort on empty db
The 'Test project list command with no database' scenario asserted the
command should abort, but the DI container creates a default SQLite DB
so list_projects() returns an empty list and exits 0 with 'No projects
found'.  Update the scenario to match the actual (correct) behavior.
2026-02-17 13:19:06 +00:00
aditya 41f90afaf9 docs(actor): add comprehensive actor YAML examples
Add 5 example actor configurations demonstrating all actor types:

Simple Examples:
- simple_llm.yaml: Basic LLM actor with code review prompt
- llm_with_tools.yaml: LLM with mix of tool references and inline tools
- tool_collection.yaml: Tool-only actor (no LLM)

Graph Examples:
- simple_graph.yaml: 3-node linear workflow (extract → analyze → summarize)
- graph_workflow.yaml: Complex TDD workflow with 10 nodes
  * Conditional routing based on test results
  * Retry logic with max attempts
  * Subgraph composition (code review)
  * Error escalation paths

Each example demonstrates:
- Proper namespaced naming (namespace/name)
- Type-specific configurations
- Context and memory settings
- Environment variable usage
- Tool definitions (inline and references)

Part 5 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 12:52:07 +00:00
aditya aaad293b6d feat(actor): add main ActorConfigSchema and YAML I/O
Add complete actor configuration schema:

Main Schema:
- ActorConfigSchema: top-level model bringing all components together
- Type-specific field requirements (LLM, TOOL, GRAPH)
- Model validator for cross-field validation
- Environment variable mappings

YAML I/O Methods:
- from_yaml_file(): load and validate from YAML
- to_yaml_file(): save configuration to YAML
- Proper error handling (FileNotFoundError, YAMLError, ValidationError)

Validation Logic:
- LLM actors require 'model' field
- TOOL actors require at least one tool
- GRAPH actors require 'model' and 'route' with cycle detection
- Namespaced name validation (namespace/name format)

Part 4 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 12:40:07 +00:00
aditya a39dd1115d feat(actor): add graph topology models (nodes, edges, routes)
Add graph workflow models for ActorType.GRAPH:

Graph Models:
- EdgeDefinition: connections between nodes with conditional routing
- NodeDefinition: node specifications (agent, tool, conditional, subgraph)
- RouteDefinition: complete graph topology with validation

Validation Features:
- Unique node ID validation
- Reference validation for all edges and entry/exit points
- Cycle detection using DFS algorithm
- Node ID format validation (alphanumeric with underscores/hyphens)

Part 3 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 12:35:44 +00:00
aditya 40190e0f2b feat(actor): add tool and config Pydantic models
Add base configuration models for actor YAML schema:

Tool Models:
- ToolParameter: parameter definitions for inline tools
- ToolDefinition: complete inline tool with Python code

Configuration Models:
- MemoryConfig: conversation history and memory settings
- ContextConfigSchema: file inclusion and context window config

All models include comprehensive validation:
- Parameter name validation (valid Python identifiers)
- Tool name validation (namespace/name format)
- Field validators using Pydantic v2 patterns

Part 2 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 12:30:21 +00:00
aditya b01178e214 feat(actor): add core enums (ActorType, NodeType, ContextView)
Add three fundamental enums for actor YAML schema validation:
- ActorType: LLM, TOOL, GRAPH execution models
- NodeType: AGENT, TOOL, CONDITIONAL, SUBGRAPH node types
- ContextView: STRATEGIST, EXECUTOR, REVIEWER, FULL context filtering

Part 1 of C1.schema implementation (Actor YAML Schema Models).
2026-02-17 12:19:39 +00:00
freemo 43b231b33b Docs: Fixed some missing check-off marks on todo items 2026-02-17 00:08:44 -05:00
Jeffrey Phillips Freeman 4dc05051dd feat(cli): add project commands (core) 2026-02-16 23:56:55 -05:00
Jeffrey Phillips Freeman 827c241baa feat(service): wire resource registry and project services 2026-02-16 23:53:50 -05:00
Jeffrey Phillips Freeman 0c6ed1c709 feat(repo): add project repositories 2026-02-16 23:50:59 -05:00
Jeffrey Phillips Freeman 96ceedbef4 Docs: Cleaned up ADR home page with better descriptions of content 2026-02-16 23:49:18 -05:00