Contributing to CODI

This guide explains how to propose changes, add new stacks or rules, extend the LLM pipeline, and maintain code quality.

1. Development Workflow

  1. Fork or clone the repository.
  2. Create a feature branch (git checkout -b feature/<topic>).
  3. Run make setup to install dependencies.
  4. Implement changes with accompanying tests.
  5. Run make lint and make test.
  6. Update relevant documentation under docs/deliverables/docs/.
  7. Submit a pull request with a clear description and testing evidence.

2. Coding Standards

Area Standard
Formatting Black (line length 100) via make format.
Imports Ruff handles sorting (ruff check --select I --fix).
Linting Ruff configured in pyproject.toml.
Types mypy with strict settings for core modules.
Documentation Markdown in docs/; reference other docs with relative links.

3. Git Hygiene

4. Adding a New Stack or Rule

  1. Extend detector/analyzer if new stack heuristics are required.
  2. Author Jinja template under patterns/templates/<stack>/.
  3. Add rule entry to patterns/rules.yml with metadata and CMD rewrite reference.
  4. Update tests (tests/test_render.py, tests/test_rules.py) to cover new rule.
  5. Document changes in RULES_GUIDE.md and REFERENCE.md.

5. Enhancing the LLM Pipeline

6. Testing Requirements

7. Documentation Expectations

8. Review Checklist

9. Communication