docs(action): add action YAML schema and examples #234

Closed
opened 2026-02-22 23:40:23 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit: docs(action): add action YAML schema and examples
  • Branch: feature/m1-action-schema

Subtasks

  • Author docs/schema/action.schema.yaml with required fields, versioning, and namespaced name validation.
  • Add schema blocks for arguments, invariants, automation_profile, inputs_schema, and optional actor refs.
  • Add action examples under examples/actions/ (minimal, invariant-heavy, read-only, estimation-actor, inputs_schema).
  • Add schema validation helper in src/cleveragents/action/schema.py (YAML load + schema validate + env var interpolation).
  • Normalize YAML keys (snake_case vs camelCase) and emit warnings for legacy aliases.
  • Normalize invariants list (trim, drop blanks, de-dup) preserving order.
  • Tests (Behave): Add scenarios that load each example YAML and assert validation passes; add invalid schema cases.
  • Tests (Robot): Add Robot smoke test that parses example YAML files.
  • Tests (ASV): Add benchmarks/action_schema_bench.py for YAML schema validation throughput.
  • Run nox (all default sessions, including benchmark).
  • Verify coverage >=97% via nox -s coverage_report. Coverage result: 98% total (action/schema.py: 98%, action/init.py: 100%).

Section: #### Section 3 Notes
Status: Completed

## Metadata - **Commit**: `docs(action): add action YAML schema and examples` - **Branch**: `feature/m1-action-schema` ## Subtasks - [x] Author `docs/schema/action.schema.yaml` with required fields, versioning, and namespaced name validation. - [x] Add schema blocks for arguments, invariants, automation_profile, inputs_schema, and optional actor refs. - [x] Add action examples under `examples/actions/` (minimal, invariant-heavy, read-only, estimation-actor, inputs_schema). - [x] Add schema validation helper in `src/cleveragents/action/schema.py` (YAML load + schema validate + env var interpolation). - [x] Normalize YAML keys (snake_case vs camelCase) and emit warnings for legacy aliases. - [x] Normalize invariants list (trim, drop blanks, de-dup) preserving order. - [x] Tests (Behave): Add scenarios that load each example YAML and assert validation passes; add invalid schema cases. - [x] Tests (Robot): Add Robot smoke test that parses example YAML files. - [x] Tests (ASV): Add `benchmarks/action_schema_bench.py` for YAML schema validation throughput. - [x] Run `nox` (all default sessions, including benchmark). - [x] Verify coverage >=97% via `nox -s coverage_report`. Coverage result: 98% total (action/schema.py: 98%, action/__init__.py: 100%). **Section**: #### Section 3 Notes **Status**: Completed
freemo added this to the v3.0.0 milestone 2026-02-22 23:40:23 +00:00
Author
Owner

Implementation Notes — Stage A2b.gamma: Action YAML Schema

2026-02-13: Stage A2b.gamma Complete - Action YAML Schema + Examples + Loader

  • Created docs/schema/action.schema.yaml, 5 example action YAMLs, ActionConfigSchema Pydantic model with from_yaml()/from_yaml_file() factory methods, camelCase->snake_case key normalization, ${ENV_VAR} interpolation, invariant normalization.
  • 31 Behave scenarios, 6 Robot smoke tests, 3 ASV benchmark suites. Coverage: 98%.

(Migrated from docs/implementation-notes.md)

## Implementation Notes — Stage A2b.gamma: Action YAML Schema **2026-02-13**: Stage A2b.gamma Complete - Action YAML Schema + Examples + Loader - Created `docs/schema/action.schema.yaml`, 5 example action YAMLs, `ActionConfigSchema` Pydantic model with `from_yaml()`/`from_yaml_file()` factory methods, camelCase->snake_case key normalization, `${ENV_VAR}` interpolation, invariant normalization. - 31 Behave scenarios, 6 Robot smoke tests, 3 ASV benchmark suites. Coverage: 98%. *(Migrated from `docs/implementation-notes.md`)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks Depends on
Reference
cleveragents/cleveragents-core#234
No description provided.