Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

fix agent rules for pipelex validate (#247)

Louis Choquel7466a912bbfc
diff --git a/.cursor/rules/best_practices.mdc b/.cursor/rules/best_practices.mdc
index 68544201b..caea92693 100644
--- a/.cursor/rules/best_practices.mdc
+++ b/.cursor/rules/best_practices.mdc
@@ -74,4 +74,4 @@ This document outlines the core best practices and patterns used in our codebase
## Pipelines
-Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
\ No newline at end of file
+Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
\ No newline at end of file
diff --git a/.cursor/rules/pipe-batch.mdc b/.cursor/rules/pipe-batch.mdc
index 50d2500da..6a2d94687 100644
--- a/.cursor/rules/pipe-batch.mdc
+++ b/.cursor/rules/pipe-batch.mdc
@@ -29,4 +29,4 @@ steps = [
# Important tip
-Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
\ No newline at end of file
+Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
\ No newline at end of file
diff --git a/.cursor/rules/pipe-condition.mdc b/.cursor/rules/pipe-condition.mdc
index 6746cf7b9..17eea9d8f 100644
--- a/.cursor/rules/pipe-condition.mdc
+++ b/.cursor/rules/pipe-condition.mdc
@@ -49,4 +49,4 @@ large = "process_large"
# Important tip
-Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
\ No newline at end of file
+Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
\ No newline at end of file
diff --git a/.cursor/rules/pipe-llm.mdc b/.cursor/rules/pipe-llm.mdc
index 3bd286c76..03ebb1904 100644
--- a/.cursor/rules/pipe-llm.mdc
+++ b/.cursor/rules/pipe-llm.mdc
@@ -111,4 +111,4 @@ prompt_template = "Describe what you see in this image"
# Important tip
-Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
\ No newline at end of file
+Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
\ No newline at end of file
diff --git a/.cursor/rules/pipe-ocr.mdc b/.cursor/rules/pipe-ocr.mdc
index 133ee8fcb..053162a9e 100644
--- a/.cursor/rules/pipe-ocr.mdc
+++ b/.cursor/rules/pipe-ocr.mdc
@@ -37,4 +37,4 @@ class PageContent(StructuredContent):
# Important tip
-Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
\ No newline at end of file
+Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
\ No newline at end of file
diff --git a/.cursor/rules/pipelex.mdc b/.cursor/rules/pipelex.mdc
index 78d6f28d5..1402e1eba 100644
--- a/.cursor/rules/pipelex.mdc
+++ b/.cursor/rules/pipelex.mdc
@@ -4,7 +4,7 @@ alwaysApply: true
# Pipeline Guide
- Always first write your "plan" in natural langage, then transcribe it in pipelex.
-- You should ALWAYS RUN the terminal command `pipelex validate` when you are writing a `.toml` file. It will ensure the pipe is runnable. If not, iterate.
+- You should ALWAYS RUN the terminal command `pipelex validate all -c pipelex/libraries` when you are writing a `.toml` file. It will ensure the pipe is runnable. If not, iterate.
- Please use POSIX standard for files. (enmpty lines, no trailing whitespaces, etc.)
# Pipeline Structure Guide
@@ -515,6 +515,6 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
)
```
-ALWAYS RUN `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate until it works.
+ALWAYS RUN `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate until it works.
Then, create an example file to run the pipeline in the `examples` folder.
But don't write documentation unless asked explicitly to.
diff --git a/AGENTS.md b/AGENTS.md
index 71e3063d5..3077b4310 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -30,7 +30,7 @@ This python >=3.10 code is in the `pipelex` directory.
## Testing
- Always test with `make codex-tests` -> it runs pytest on our `tests/` directory using proper settings
-- If all unit tests pass, run `make validate` -> it runs a minimal version of our app with just the inits and data loading (`pipelex validate all` under the hood)
+- If all unit tests pass, run `make validate` -> it runs a minimal version of our app with just the inits and data loading (`pipelex validate all -c pipelex/libraries` under the hood)
## PR Instructions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b608cda69..9775d39aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -42,7 +42,7 @@
- `pipelex init libraries [DIRECTORY]` - Initialize pipelex libraries (creates `pipelex_libraries` folder)
- `pipelex init config` - Initialize pipelex configuration (creates `pipelex.toml`)
- **`pipelex validate`** - Validation and dry-run commands
- - `pipelex validate all` - Validate all libraries and dry-run all pipes
+ - `pipelex validate all -c pipelex/libraries` - Validate all libraries and dry-run all pipes
- `pipelex validate pipe PIPE_CODE` - Dry run a single pipe by its code
- **`pipelex show`** - Show and list commands
- `pipelex show config` - Show the pipelex configuration
@@ -225,7 +225,7 @@ Simplified input memory:
### Documentation & Development Experience
- **Cursor Rules Enhancement**: Comprehensive pipe controller documentation covering `PipeSequence`, `PipeCondition`, `PipeBatch`, and `PipeParallel`, improved PipeOperator documentation for `PipeLLM`, `PipeOCR`
-- **Pipeline Validation CLI**: Enhanced `pipelex validate all` command with better error reporting and validation coverage
+- **Pipeline Validation CLI**: Enhanced `pipelex validate all -c pipelex/libraries` command with better error reporting and validation coverage
- **Improved Error Messages**: Better formatting and context for pipeline configuration errors
### Changed
@@ -542,7 +542,7 @@ is_reporting_enabled = true
- Use a minimum version for `uv` instead of a fixed version
- Implement `AGENTS.md` for Codex
- Add tests for some of the `tools.misc`
-- pipelex cli: Rename `pipelex run-setup` to `pipelex validate all`
+- pipelex cli: Rename `pipelex run-setup` to `pipelex validate all -c pipelex/libraries`
## [v0.2.8] - 2025-05-28
diff --git a/CLAUDE.md b/CLAUDE.md
index 2a57cb258..e1348a788 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -82,7 +82,7 @@ class TestFooBar:
- Always test with `make t` -> it runs pytest using proper settings
- If some pytest tests fail, run pytest on the failed ones with the required verbosity to diagnose the issue
-- If all unit tests pass, run `make validate` -> it runs a minimal version of our app with just the inits and data loading (`pipelex validate all` under the hood)
+- If all unit tests pass, run `make validate` -> it runs a minimal version of our app with just the inits and data loading (`pipelex validate all -c pipelex/libraries` under the hood)
## PR Instructions
diff --git a/docs/pages/configuration/config-technical/library-config.md b/docs/pages/configuration/config-technical/library-config.md
index 633ea7850..d5265ac96 100644
--- a/docs/pages/configuration/config-technical/library-config.md
+++ b/docs/pages/configuration/config-technical/library-config.md
@@ -122,7 +122,7 @@ The library system includes specific error types:
2. **Validation**:
- - Run `pipelex validate all` after making changes
+ - Run `pipelex validate all -c pipelex/libraries` after making changes
- Check for domain consistency
- Verify concept relationships
diff --git a/docs/pages/configuration/index.md b/docs/pages/configuration/index.md
index 9e8cab9df..73d353d06 100644
--- a/docs/pages/configuration/index.md
+++ b/docs/pages/configuration/index.md
@@ -69,5 +69,5 @@ NB: The run_mode unit_test is used for testing purposes.
1. **Version Control**: Include your base `pipelex.toml` in version control
2. **Environment Overrides**: Use environment-specific files for sensitive or environment-dependent settings
3. **Documentation**: Comment any custom settings for team reference
-4. **Validation**: Run `pipelex validate all` after making configuration changes
+4. **Validation**: Run `pipelex validate all -c pipelex/libraries` after making configuration changes
5. **Gitignore**: Add local and sensitive override files to `.gitignore`
diff --git a/docs/pages/migration/index.md b/docs/pages/migration/index.md
index b4a391c09..1db102a3e 100644
--- a/docs/pages/migration/index.md
+++ b/docs/pages/migration/index.md
@@ -59,7 +59,7 @@ If you prefer to migrate manually or need to handle special cases:
1. **Locate your TOML files**: Find all pipeline library files (typically in your configured pipelines directory)
2. **Update concept definitions**: Change `Concept =` to `definition =` in all `[concept.ConceptName]` sections
-3. **Validate syntax**: Run `pipelex validate all` to ensure your files are correctly formatted
+3. **Validate syntax**: Run `pipelex validate all -c pipelex/libraries` to ensure your files are correctly formatted
### Examples
@@ -192,7 +192,7 @@ If you prefer to migrate manually:
- Replace `PipeClassName = "description"` with:
- `type = "PipeClassName"`
- `definition = "description"`
-3. **Validate syntax**: Run `pipelex validate all` to ensure your files are correctly formatted
+3. **Validate syntax**: Run `pipelex validate all -c pipelex/libraries` to ensure your files are correctly formatted
### Examples
diff --git a/docs/pages/tools/cli.md b/docs/pages/tools/cli.md
index 2fe5e781b..9ad9e9bf3 100644
--- a/docs/pages/tools/cli.md
+++ b/docs/pages/tools/cli.md
@@ -42,9 +42,9 @@ pipelex migrate run [-c/--config-folder-path PATH] [--dry-run] [--backups/--no-b
## Usage Tips
-1. Always run `pipelex validate all` after making changes to your configuration or pipelines
+1. Always run `pipelex validate all -c pipelex/libraries` after making changes to your configuration or pipelines
2. Use `pipelex show config` to debug configuration issues
3. When initializing a new project:
- Start with `pipelex init config`
- Then run `pipelex init libraries`
- - Finally, validate your setup with `pipelex validate all`
+ - Finally, validate your setup with `pipelex validate all -c pipelex/libraries`