|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thank you for your interest in contributing to the Salesforce Deployment Failure Analyser. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +```bash |
| 8 | +git clone https://github.com/mssm-sftechstack/salesforce-devops-ai-assistant.git |
| 9 | +cd salesforce-devops-ai-assistant |
| 10 | +pip install pytest |
| 11 | +python -m pytest tests/ -v |
| 12 | +``` |
| 13 | + |
| 14 | +No other dependencies are needed to run the tool in mocked mode or to run the tests. |
| 15 | + |
| 16 | +## Ways to Contribute |
| 17 | + |
| 18 | +### Add a new scenario |
| 19 | +Scenarios live in `sample_data/` (input) and `sample_outputs/` (expected output). |
| 20 | + |
| 21 | +1. Create `sample_data/your_scenario.json` following the input schema in the README |
| 22 | +2. Generate output by running: `python main.py --input sample_data/your_scenario.json --live` |
| 23 | +3. Save the result to `sample_outputs/your_scenario_output.json` |
| 24 | +4. Register the scenario in the `SCENARIOS` dict in `main.py` |
| 25 | + |
| 26 | +### Extend the input schema |
| 27 | +- Update `validate_input()` in `main.py` to accept new fields |
| 28 | +- Update `validate_output()` if the output schema changes |
| 29 | +- Add test cases in `tests/test_validation.py` |
| 30 | +- Update the schema table in `README.md` |
| 31 | + |
| 32 | +### Improve the prompt |
| 33 | +The Claude prompt is `CLAUDE_PROMPT` in `main.py`. Changes to the prompt should be validated against all three preset scenarios using `--live` mode before submitting. |
| 34 | + |
| 35 | +### Fix a bug or add a roadmap item |
| 36 | +Open an issue first to describe the change, then submit a pull request referencing the issue. |
| 37 | + |
| 38 | +## Running Tests |
| 39 | + |
| 40 | +```bash |
| 41 | +python -m pytest tests/ -v |
| 42 | +``` |
| 43 | + |
| 44 | +All tests must pass before a pull request will be merged. |
| 45 | + |
| 46 | +## Code Style |
| 47 | + |
| 48 | +- Python 3.9+ compatible |
| 49 | +- No external dependencies in the core tool (mocked mode must stay dependency-free) |
| 50 | +- Keep `main.py` self-contained — helper logic belongs in the same file, not a separate module |
| 51 | + |
| 52 | +## Reporting Issues |
| 53 | + |
| 54 | +Open a GitHub issue with: |
| 55 | +- The input JSON you used |
| 56 | +- The error or unexpected output |
| 57 | +- Whether you were using mocked or `--live` mode |
0 commit comments