Skip to content

Commit f3a8e18

Browse files
Audit SDK (#70)
Prepare for the definition of an audit SDK, where JSONL becomes a single backend. Refer to src/mxcp/sdk/audit/__init__.py for usage instructions. --------- Co-authored-by: Benjamin Gaidioz <ben@raw-labs.com>
1 parent 1487f39 commit f3a8e18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+6488
-780
lines changed

.cursor/rules/cli-stability.mdc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
description: CLI command stability and interface preservation
3+
globs: ["**/cli/*.py", "**/cli.md", "**/__main__.py"]
4+
alwaysApply: true
5+
---
6+
7+
# CLI Command Stability
8+
9+
## Command Names and Structure
10+
- NEVER change the names of existing CLI commands unless explicitly asked
11+
- NEVER rename CLI subcommands without explicit user request
12+
- NEVER restructure the command hierarchy (e.g., moving from `mxcp log` to `mxcp audit log`) without explicit approval
13+
- If suggesting CLI improvements, always present them as proposals, not implementations
14+
15+
## Command Output
16+
- NEVER change the output format of existing CLI commands unless specifically requested
17+
- Preserve existing formatting, column structure, and data presentation
18+
- JSON output structures must remain backward compatible
19+
- Exit codes must remain consistent
20+
21+
## Command Parameters
22+
- NEVER remove existing command-line options or flags
23+
- New options can be added but must not change the behavior of existing options
24+
- Default values for existing parameters must not change
25+
- Parameter types (string, int, bool) must remain consistent
26+
27+
## Examples of What NOT to Do
28+
- Don't change `mxcp log` to `mxcp audit log`
29+
- Don't change `mxcp log-cleanup` to `mxcp audit cleanup`
30+
- Don't modify table formatting in CLI output
31+
- Don't change JSON response structures
32+
- Don't alter the order or presence of output fields
33+
34+
## When Making CLI Changes
35+
- Always ask for confirmation before changing command names
36+
- Document any breaking changes explicitly
37+
- Preserve backward compatibility where possible
38+
- Consider adding aliases rather than renaming commands

.cursor/rules/code-organization.mdc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
description: Code and file organization standards
3+
globs: ["**/*.py", "**/*.yml", "**/*.yaml", "**/*.json"]
4+
alwaysApply: true
5+
---
6+
7+
# Code Organization
8+
9+
- Avoid code duplication - use inheritance or composition when classes share common fields
10+
- Keep related functionality together in modules
11+
12+
# File Organization
13+
14+
- JSON schema files should be kept in a schemas/ subdirectory within the module
15+
- Configuration files should use YAML format
16+
- NO example files anywhere - not in tests, not in fixtures, nowhere

.cursor/rules/dependencies.mdc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: Dependency management guidelines
3+
globs: ["**/pyproject.toml", "**/requirements.txt", "**/setup.py", "**/package.json"]
4+
alwaysApply: true
5+
---
6+
7+
# Dependency Management
8+
9+
- Use existing dependencies where possible (e.g., pandas, numpy are already available)
10+
- Avoid adding new dependencies without clear justification
11+
- Remember to add dependencies to pyproject.toml as needed, under the corresponding component

.cursor/rules/development.mdc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: Development practices and import management
3+
globs: ["**/*.py", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
4+
alwaysApply: true
5+
---
6+
7+
# Development Practices
8+
9+
- Do not create "backward compatibility" support in the code unless explicitly asked; this is a new s/w stack being used and it has no users yet, so backward compat is not a concern
10+
- Do not create re-export modules or wrapper functions just to maintain old import paths - update imports directly to use the new locations
11+
- When consolidating or refactoring modules, always update all imports to use the new structure rather than preserving old import paths

.cursor/rules/documentation.mdc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: Documentation standards and practices
3+
globs: ["**/*.py", "**/*.md", "**/*.rst"]
4+
alwaysApply: true
5+
---
6+
7+
# Documentation Standards
8+
9+
- Use pydoc (docstrings) for documentation, not README.md files
10+
- Module-level docstrings may include code examples if they add clarity
11+
- No standalone example files - examples belong in docstrings only

.cursor/rules/testing.mdc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
description: Testing standards and practices
3+
globs: ["**/test_*.py", "**/tests/**", "**/*_test.py"]
4+
alwaysApply: true
5+
---
6+
7+
# Testing Standards
8+
9+
- Tests should be in a package structure matching the code (e.g., tests/validator/ for src/mxcp/validator/). Test data should go under tests/fixtures/validator/
10+
- Use descriptive test names that match the functionality being tested
11+
- NO example usage files - all code should be either tests or production code
12+
- Use `uv run pytest` to run tests (not just `pytest`)
13+
- Don't always create new test suites; check first if the new tests should be added to existing test suites
14+
15+
## Test File Naming Conventions
16+
17+
Test files should follow clear, self-documenting naming patterns:
18+
- For module tests: `test_<module_name>.py` (e.g., `test_validation.py`)
19+
- For CLI command tests: `test_cli_<command>.py` (e.g., `test_cli_audit_cleanup.py`, `test_cli_init.py`)
20+
- For feature/functionality tests: `test_<feature>_<specific_part>.py` (e.g., `test_audit_exporters.py`, `test_drift_check.py`)
21+
- For integration tests: `test_<component>_integration.py` (e.g., `test_vault_integration.py`)
22+
23+
Avoid vague names like `test_exporters.py` - instead use specific names like `test_audit_exporters.py` that clearly indicate what functionality is being tested.

.cursorrules

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve MXCP
4+
title: '[BUG] '
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
## Describe the Bug
10+
A clear and concise description of what the bug is.
11+
12+
## To Reproduce
13+
Steps to reproduce the behavior:
14+
1. Run command `...`
15+
2. With configuration `...`
16+
3. See error
17+
18+
## Expected Behavior
19+
A clear and concise description of what you expected to happen.
20+
21+
## Environment
22+
- **MXCP Version**: [e.g., 0.3.0]
23+
- **Python Version**: [e.g., 3.11.5]
24+
- **Operating System**: [e.g., Ubuntu 22.04, macOS 14.0, Windows 11]
25+
- **Installation Method**: [e.g., pip, uv, source]
26+
27+
## Configuration
28+
```yaml
29+
# mxcp-site.yml
30+
# (redact any sensitive information)
31+
```
32+
33+
## Error Output
34+
```
35+
Paste the full error output here
36+
```
37+
38+
## Additional Context
39+
Add any other context about the problem here, such as:
40+
- Does this happen consistently or intermittently?
41+
- Any workarounds you've found?
42+
- Related issues or PRs?
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for MXCP
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
8+
9+
## Is your feature request related to a problem?
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
## Describe the solution you'd like
13+
A clear and concise description of what you want to happen.
14+
15+
## Describe alternatives you've considered
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
## Use Case
19+
Describe the specific use case and how this feature would benefit MXCP users.
20+
21+
## Implementation Ideas
22+
If you have ideas on how this could be implemented, please share them.
23+
24+
## Additional Context
25+
Add any other context, screenshots, or examples about the feature request here.

.github/dependabot.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for Python dependencies
4+
- package-ecosystem: "pip"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "09:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "raw-labs/mxcp-maintainers"
13+
commit-message:
14+
prefix: "deps"
15+
include: "scope"
16+
17+
# Enable version updates for GitHub Actions
18+
- package-ecosystem: "github-actions"
19+
directory: "/"
20+
schedule:
21+
interval: "weekly"
22+
day: "monday"
23+
time: "09:00"
24+
open-pull-requests-limit: 5
25+
reviewers:
26+
- "raw-labs/mxcp-maintainers"
27+
commit-message:
28+
prefix: "ci"
29+
include: "scope"

0 commit comments

Comments
 (0)