python_code_review:
  description: "Check Python files for code quality, style, and best practices."
  match:
    include:
      - "**/*.py"
  review:
    strategy: individual
    instructions:
      file: .deepwork/review/python_code_review.md

python_lint:
  description: "Run ruff (lint + format) and mypy on changed Python files."
  match:
    include:
      - "**/*.py"
  review:
    strategy: matches_together
    instructions:
      file: .deepwork/review/python_lint.md

requirements_traceability:
  description: "Verify requirements traceability between specs, code, and tests."
  match:
    include:
      - "**/*"
  review:
    strategy: all_changed_files
    agent:
      claude: requirements-reviewer
    instructions: |
      Review the changed files for requirements traceability.

      This project keeps formal requirements in `specs/` using the naming pattern
      `REQ-NNN-<topic>.md` with individually numbered requirements (e.g. REQ-001.1).
      Tests live in `tests/` and reference requirement IDs via docstrings and
      traceability comments.

      For this review:
      1. Check that any new or changed end-user functionality has a corresponding
         requirement in `specs/`.
      2. Check that every requirement touched by this change has at least one
         automated test referencing it in `tests/`.
      3. Flag any test modifications where the underlying requirement did not
         also change.
      4. Verify traceability comments are present, correctly reference
         requirement IDs, and use the standard two-line format:
         ```
         # THIS TEST VALIDATES A HARD REQUIREMENT (REQ-xxx.x.x).
         # YOU MUST NOT MODIFY THIS TEST UNLESS THE REQUIREMENT CHANGES
         ```
         Both lines are required. They must appear inside the method body
         (after `def`, before the docstring). If tests have REQ references
         only in docstrings but are missing the formal comment block, flag
         them. If the second line is missing, flag that too.

      Produce a structured review with Coverage Gaps, Test Stability Violations,
      Traceability Issues, and a Summary with PASS/FAIL verdicts.
