# v0.4.0 Roadmap

This document tracks planned features, improvements, and fixes for v0.4.0.

## New Rules

### High Priority

| Rule  | Description                                      | Severity | Status    |
| ----- | ------------------------------------------------ | -------- | --------- |
| SM020 | `AlterField(..., null=False)` without backfill   | ERROR    | Completed |
| SM021 | Adding UNIQUE via `AlterField(unique=True)`      | ERROR    | Completed |
| SM022 | Default value with expensive callable            | WARNING  | Completed |
| SM023 | Adding ManyToMany field (creates junction table) | INFO     | Completed |
| SM024 | SQL injection patterns in `RunSQL`               | ERROR    | Completed |

### Medium Priority

| Rule  | Description                                        | Severity | Status    |
| ----- | -------------------------------------------------- | -------- | --------- |
| SM025 | Foreign key without db_index on large tables       | WARNING  | Completed |
| SM026 | RunPython with `.all()` on large tables (no batch) | WARNING  | Completed |
| SM027 | Missing merge migration (multiple leaf nodes)      | ERROR    | Completed |

## Features

### High Priority

- [x] **Custom Rule Plugin System**

  - Allow `SAFE_MIGRATIONS['EXTRA_RULES']` for project-specific rules
  - Rule registry/discovery system
  - Security documentation for dynamic loading

- [x] **`--list-rules` Command**

  - List all available rules with descriptions
  - Show categories and severity levels
  - Support `--format=json` for tooling

- [x] **Configuration Validation**

  - Validate rule IDs on startup
  - Suggest corrections for typos
  - Validate category names

### Medium Priority

- [ ] **Interactive Mode (`--interactive`)** - Deferred to v0.5.0

  - Guide users through suppressing false positives
  - Explain rules in detail
  - Generate suppression comments

- [ ] **Progress Reporting (`--verbose`)** - Deferred to v0.5.0

  - Show progress for large codebases
  - Display current migration being analyzed
  - Timing information

- [x] **Better CLI Help**

  - Add examples to `--help` output
  - Include links to documentation
  - Configuration examples

## Documentation

### Missing Documentation

- [x] `/docs/troubleshooting.md` - Handling false positives and edge cases
- [x] `/docs/custom-rules.md` - API guide for rule authors
- [x] `/docs/architecture.md` - High-level architecture overview
- [x] `CONTRIBUTING.md` - Contribution guidelines

### Documentation Improvements

- [x] Expand `/docs/patterns.md` with more before/after examples
- [x] Add CI/CD examples for GitLab, Jenkins, Azure Pipelines
- [x] Add "Known Limitations" section to README

## Code Quality

### Refactoring

- [x] Consolidate rule-enabling logic in `analyzer.py` (DRY)
- [x] Simplify `OSError/IOError` handling (IOError is alias in Python 3)
- [x] Better exception handling in `cli.py` (replace broad `except Exception`)

### Testing

- [x] Add SARIF schema validation tests
- [x] Add error recovery tests (malformed migrations)
- [x] Add performance benchmarks
- [x] Add tests for configuration edge cases

## CI/CD

- [x] Update codecov-action to v5
- [ ] Add MkDocs deployment to GitHub Pages
- [x] Add `pip-audit` for dependency vulnerability scanning
- [ ] Consider release automation (auto-version bumping)

## Integrations (Future - v0.5.0+)

- [ ] VS Code extension
- [ ] Prometheus metrics export
- [ ] Custom webhooks (Slack, Teams)

## Breaking Changes

None.

## Migration Guide

N/A - no breaking changes.

______________________________________________________________________

## Priority Legend

- **High Priority**: Core functionality, high user impact
- **Medium Priority**: Nice-to-have, moderate impact
- **Future**: Long-term goals, may move to v0.5.0+
