Skip to content

feat(scenario): add scenario cli with cli docs#87

Open
JasonZ-c wants to merge 7 commits intomainfrom
add-cli-fix-linting-jz
Open

feat(scenario): add scenario cli with cli docs#87
JasonZ-c wants to merge 7 commits intomainfrom
add-cli-fix-linting-jz

Conversation

@JasonZ-c
Copy link
Copy Markdown
Collaborator

@JasonZ-c JasonZ-c commented Apr 2, 2026

Description

Adds a new pare scenarios CLI for listing, inspecting split files, validating scenario ID files, and running scenario generation workflows.
Cleans up tooling by moving scenario-runner logic into pare/ and fixing dependency checks for local development.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (code restructuring without changing behavior)
  • Documentation update
  • Test coverage improvement
  • Performance improvement
  • Chore (dependency updates, CI/CD, tooling)

Related Issues

Closes #N/A

Related Design Documents

  • None

Component

  • Core (All files in the root pare, e.g. pare/environment.py)
  • Agents (All files in pare/agents/)
  • Scenarios (All files in pare/scenarios/)
  • Scenario Generator (All files in pare/scenario_generator/)
  • Apps (All files in pare/apps/)
  • Testing Infrastructure
  • Documentation (Documentation files e.g., docs/, mkdocs.yml, README.md)
  • Other

Other: CLI / developer tooling

Changes Made

  • Added a new pare scenarios CLI module and wired it into the top-level pare command.
  • Added CLI coverage for help output, root --list behavior, and split metadata output.
  • Moved scenario runner logic into pare/scenarios/run_scenarios.py and kept source code under pare/ independent from scripts/.
  • Updated scenario docs under docs/scenarios/ and docs/index.md to reflect the new CLI and current pare naming.
  • Updated dependency/tooling config so deptry and local checks pass with the new source layout.

Breaking Changes

  • This PR introduces breaking changes
  • Migration guide included (if applicable)

Details:

  • None.

Testing

Test Coverage

  • Unit tests added/updated
  • Integration tests added/updated
  • All tests pass locally (make test or uv run pytest)
  • Test coverage maintained or improved

Manual Testing

Test steps:

  1. Ran uv run python -m pare.main scenarios --help to verify the new CLI registration and command surface.
  2. Ran uv run pytest tests/cli/test_scenarios_cli.py to verify the new CLI behavior.
  3. Ran make check and uv run deptry pare to verify linting, typing, and dependency checks.

Test environment:

  • OS: macOS
  • Python version: 3.12.11
  • Relevant models used (if applicable): None

Code Quality

  • Pre-commit hooks pass (see output below)
  • No dependency issues (uv run deptry pare)
  • Code follows project style guidelines (f-strings, Google docstrings, etc.)

Pre-commit output:

Screenshot 2026-04-01 at 20 07 47 Screenshot 2026-04-02 at 01 02 44
uv run deptry pare
Success! No dependency issues found.

@JasonZ-c JasonZ-c requested a review from deepakn97 April 2, 2026 03:14
JasonZ-c and others added 2 commits April 1, 2026 20:16
Include the renamed PARE scenario-generation guide in the PR so the workflow docs match the new CLI and repo naming.

Made-with: Cursor
Comment thread .pre-commit-config.yaml
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this change?
Why is the language marked as system?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's because our project depends on a specific Python version and a uv-managed environment
pre-commit’s default isolated env was not reliably reproducing that and may cause error during the pre-commit check

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so in this case the language: system tells pre-commit not to build a separate env while
uv run mypy ensures the hook runs in the same environment the project actually uses

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution is actually simpler. You just need to run uv run git commit -m "<message>".

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice it's working, a quick note that should we add this cmd to Readme.md?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worries, actually I just added it here in previous commit

Comment thread pyproject.toml Outdated

[tool.deptry]
known_first_party = ["pare"]
known_first_party = ["pare", "scripts"]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are scripts first party? Scripts is not a package and deptry should not run on them?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's due to in the orchestrator code we imported the run_scenarios file in scripts folder here, should we move run_scenarios under pare/ instead? so that we can remove "scripts" from known_first_party.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants