Expert assistant for the System Operations Manager Python CLI framework. Helps with development, testing, architecture, and plugin system.
Expert assistant for working with the System Operations Manager - a Python-based CLI framework for managing distributed systems, deployments, monitoring, and infrastructure operations.
Provides comprehensive guidance for developing, testing, and maintaining the System Operations Manager CLI. Covers architecture patterns, plugin development, testing strategies, and best practices specific to this codebase.
When working with this repository, follow these guidelines:
The system uses a layered architecture:
```
User Interface (CLI/REPL/REST API)
↓
Command Processing (Router, Validation, Error Handling)
↓
Core Engine (Plugin Manager, Config Manager, State Management)
↓
Service Layer (Deployment, Monitoring, System Control)
↓
Integration Layer (External APIs, File System, SSH)
```
**Key architectural patterns:**
- Plugins inherit from `Plugin` base class
- Must implement: `initialize()`, `register_commands()`, `cleanup()`
- Entry points defined in `pyproject.toml` under `[tool.poetry.plugins."system_operations_manager.plugins"]`
1. Default → 2. System → 3. User → 4. Project → 5. Environment vars → 6. CLI args
```
src/system_operations_manager/
├── cli/ # CLI command definitions (Typer)
├── core/ # Core engine and plugin system
├── logging/ # Structured logging with structlog
├── services/ # Business logic services
├── integrations/ # External tool integrations
├── plugins/ # Built-in plugins
└── utils/ # Utility functions
```
**Setup and dependencies:**
```bash
poetry install
poetry install --all-extras
pre-commit install
```
**Optional dependency groups:**
**Code quality checks:**
```bash
ruff check src tests
ruff format src tests
mypy src
pre-commit run --all-files
```
**Running tests:**
```bash
pytest
pytest tests/unit/test_version.py
pytest -k "test_status"
pytest -v
pytest --cov=system_operations_manager
```
**Test markers available:**
**Coverage target:** 80%+
```bash
poetry run ops --version
poetry run ops status
poetry run ops init
```
The CLI entry point is `ops` command via `system_operations_manager.cli.main:main`.
Uses conventional commits with commitlint validation:
**Format:** `type(scope): description`
**Types:** `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
**Scopes:** `adr`, `config`, `docs`, `examples`, `features`, `integrations`, `plugins`, `commands`, `deps`, `release`, `setup`
**Rules:**
**Example:** `feat(plugins): add hot-reload support for custom plugins`
When creating or modifying plugins:
1. Inherit from the `Plugin` base class
2. Implement all required methods: `initialize()`, `register_commands()`, `cleanup()`
3. Register plugin entry points in `pyproject.toml`
4. Add appropriate test coverage with relevant markers
5. Document configuration options and CLI commands
6. Handle errors gracefully with proper logging
When working with configuration:
1. Respect the configuration hierarchy (default → system → user → project → env → CLI)
2. Use profile inheritance for shared configurations
3. Validate configuration values before use
4. Document all configuration options
5. Provide sensible defaults
**Scenario:** Adding a new monitoring plugin
1. Create plugin class inheriting from `Plugin` in `src/system_operations_manager/plugins/`
2. Implement required methods with monitoring logic
3. Register entry point in `pyproject.toml`
4. Add unit tests with `@pytest.mark.unit` and integration tests with `@pytest.mark.monitoring`
5. Update documentation
6. Run quality checks: `ruff check && mypy src && pytest --cov`
7. Commit: `feat(plugins): add Datadog monitoring integration`
**Scenario:** Debugging test failures
1. Run specific test: `pytest tests/unit/test_plugin.py -v`
2. Check logs in test output
3. Use markers to isolate: `pytest -k "test_plugin_init"`
4. Run with coverage to identify gaps: `pytest --cov=system_operations_manager.plugins`
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/system-operations-manager-cli-assistant/raw