Prompt file imported from YoavLax/agent-compass (
.github/prompts/add-rule.prompt.md). Copyright stays with the author.
Add a new scoring rule to AgentCompass following
CONTRIBUTING.md's "Adding a rule" section and the
determinism contract:
- Ask for (or infer from context) the pillar, the rule id, the spec/failure mode it's derived from, and its severity/effort.
- Add a pure
@rule(...)-decorated function to the matchingsrc/airx/rules/<pillar>.pymodule. Never calldatetime.now(),time.time(), unseeded randomness, environment variables, network calls, or depend on filesystem iteration order or path separators/case. - Extend
model.py/patterns.py/discovery.pyfirst if the rule needs a newArtifactKindorArtifactIndexfield. - Add pass/fail/not-applicable unit tests in
tests/test_rules_<pillar>.pyusingtmp_path-built micro-repos. - Regenerate
docs/RULES.mdviaairx rules --format mdand bumpRULESET_VERSIONinsrc/airx/rules/registry.py. - Run
pytest -vand show the passing output before finishing.
