forked from cleveragents/cleveragents-core
f2f7aa5dc9
Implement multiple Stage A/B/E/SEC milestones for the v3 lifecycle system: - Stage A5.3+A5.4: Add LifecycleActionModel and LifecyclePlanModel SQLAlchemy models with to_domain()/from_domain() conversion methods - Stage A5.6: Implement ActionRepository with full CRUD, namespace/state queries, referential integrity checks, and retry decorator - Stage E1: Add subplan domain models (ExecutionMode, SubplanMergeStrategy, SubplanConfig, SubplanStatus, SubplanAttempt, SubplanFailureHandler) with computed properties on Plan (is_subplan, is_root_plan, depth, has_subplans) - Stage A6: Add AutomationLevel enum (MANUAL, REVIEW_BEFORE_APPLY, FULL_AUTOMATION), settings integration, PlanLifecycleService auto-progression, pause/resume, and CLI commands (--automation-level, set-automation-level) - Stage SEC1: Remove eval()/exec() from stream_router.py, replace with named operation and transform registries; code blocks and unregistered transforms now raise StreamRoutingError - Add langchain-anthropic dependency - Update BDD tests for security changes and relax ADR directory requirement
54 lines
2.4 KiB
Gherkin
54 lines
2.4 KiB
Gherkin
Feature: Architecture validation
|
|
As a developer
|
|
I want to verify the architecture follows our ADRs
|
|
So that the codebase remains maintainable
|
|
|
|
Scenario: ADR directory is absent after cleanup
|
|
Given the ADR directory "docs/architecture/decisions" may be absent
|
|
Then the ADR check should be skipped when the directory is missing
|
|
|
|
Scenario: Package structure follows layering ADR
|
|
Given the source directory exists at "src/cleveragents"
|
|
When I check the package structure
|
|
Then I should find these main packages:
|
|
| package | description |
|
|
| cli | Command line interface |
|
|
| runtime | Server and background workers |
|
|
| application | Business logic and workflows |
|
|
| domain | Domain models and contracts |
|
|
| infrastructure | External integrations |
|
|
| providers | Model provider implementations |
|
|
| config | Configuration management |
|
|
| core | Shared core components |
|
|
| shared | Cross-cutting concerns |
|
|
|
|
Scenario: Dependencies follow inversion principle
|
|
Given the package structure is defined
|
|
When I analyze package imports
|
|
Then domain should not import from infrastructure
|
|
And domain should not import from application
|
|
And the core package should be self-contained
|
|
|
|
Scenario: Configuration uses CLEVERAGENTS prefix
|
|
Given the settings module exists
|
|
When I check environment variable definitions
|
|
Then all application variables should use CLEVERAGENTS_ prefix
|
|
And provider variables should keep their original prefix
|
|
|
|
Scenario: Type hints are used throughout
|
|
Given the source code exists
|
|
When I check for type annotations
|
|
Then all public functions should have type hints
|
|
And all dataclasses should use Pydantic models
|
|
|
|
Scenario: CONTRIBUTING documents LangChain best practices
|
|
When I read the CONTRIBUTING guidelines
|
|
Then the contributing document should include "LangChain/LangGraph Best Practices"
|
|
And the contributing document should include "Graph Design Patterns"
|
|
And the contributing document should include "Testing LangChain/LangGraph Code"
|
|
|
|
Scenario: Every source module imports without errors
|
|
Given the source directory exists at "src/cleveragents"
|
|
When I import every module under the source directory
|
|
Then every module should import without errors
|