Skip to content

Latest commit

 

History

History
102 lines (72 loc) · 3.35 KB

File metadata and controls

102 lines (72 loc) · 3.35 KB

Contributing to Agent-Litmus

Thank you for your interest in improving test quality governance.

How to Contribute

Adding a New Violation Type

  1. Define the violation in references/violation-types.md:

    • Name (SCREAMING_SNAKE_CASE)
    • Category (A: Assertion Weakness, B: Test Design, C: Coverage Gaps, D: Test Integrity)
    • Default severity (critical, error, warning, info)
    • Detection method
    • Examples in at least 2 languages
    • "Why It Matters" explanation
  2. Add to the protocol in templates/litmus-protocol.yaml:

    • Add the violation name under violations: with its default severity
    • Add penalty points under penalties: if introducing a new severity
  3. Update the test-audit skill in .claude/skills/test-audit/SKILL.md:

    • Add detection logic under the appropriate category step
    • Include in the verdict calculation
  4. Update the assertion-analyzer agent in .claude/agents/assertion-analyzer.md:

    • Add detection rules
  5. Update adapters:

    • adapters/claude-code/commands/litmus-scan.md
    • adapters/codex/AGENTS.md
    • adapters/cursor/.cursor/rules/litmus.md
    • adapters/aider/.aider.conf.yml
  6. Update prompts:

    • prompts/litmus-scan.md

Adding Assertion Patterns for a New Framework

  1. Update references/assertion-classification.md:

    • Add a new section for the framework
    • Provide STRONG, WEAK, and HOLLOW examples
    • Note any framework-specific edge cases
  2. Update the assertion-analyzer agent if the framework uses unusual assertion syntax.

Adding a New CLI Adapter

  1. Create the adapter directory under adapters/{cli-name}/

  2. Write the configuration file following the target CLI's conventions:

    • System prompt integration
    • Rule files
    • Configuration files
  3. Update the installer in install.sh:

    • Add detection logic in detect_cli()
    • Add setup logic in the case block
  4. Update adapters/generic/README.md with the new platform in the support table.

Adding a New Edge Case Category

  1. Update references/edge-case-taxonomy.md:

    • Add the category with description
    • Include concrete examples
    • Add to the priority matrix
  2. Update the edge-detector agent in .claude/agents/edge-detector.md.

  3. Update the edge-analysis skill in .claude/skills/edge-analysis/SKILL.md.

  4. Update templates/litmus-protocol.yaml under edge.categories.

Code Style

  • Skills use step-by-step numbered workflows
  • Agents use role + capabilities + rules format
  • Commands use YAML frontmatter + invocation instruction
  • References use tables + code examples
  • All files are Markdown (except YAML configs and JSON metadata)

Testing Your Changes

Since Agent-Litmus is a prompt-based plugin (no runtime code), testing means:

  1. Run each modified command against a sample test file
  2. Verify the output matches the expected format
  3. Check that new violation types are detected correctly
  4. Verify scoring changes produce reasonable TQS values

Pull Request Process

  1. Fork the repository
  2. Create a feature branch: feature/add-violation-type-x
  3. Make your changes across all affected files
  4. Submit a PR with:
    • What violation/feature you added
    • Example detection output
    • Which files were modified

License

By contributing, you agree that your contributions will be licensed under the MIT License.