PromptGuard is rule-driven. Contributions should include tests.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
python -m pytest -q- Add or update a rule in
promptguard/rules.json. - Copy it to the installable skill:
cp promptguard/rules.json skills/promptguard/references/rules.json- Add eval coverage in one of:
eval/cases.jsonl
eval/daily_life_cases.jsonl
eval/technical_cases.jsonl
eval/real_world_usage_cases.jsonl
- Add or update tests.
Good rules produce:
- evidence
- impact
- missing/conflicting contract
- clarification questions
- approval criteria
- fix draft
Avoid rules that only say "this is vague." The user should know what decision is missing and what to ask next.