adrai-org / adrai-org/adr-ai-tools-py

[FEATURE] Single ADR × Single File LLM Compliance Check

Ouverte
#25 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
4
Forks
1
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## ✨ Feature Request Template

### **Feature Description**
Implement a basic LLM-powered compliance check that validates whether a single code file adheres to a specific ADR (Architecture Decision Record).

### **Use Case**
As a developer, I want to verify that my code changes comply with specific architectural decisions documented in ADRs. This helps maintain consistency and prevents architectural drift by providing automated feedback on code compliance.

### **Proposed Solution**
Add a new `check` command with the following interface:
```bash
adr-ai-tools check --adr docs/adr/0015-service-layer-architecture.md --file src/services/adr_initializer.py
```

The command should:
1. Read and parse the specified ADR file
2. Read the specified code file
3. Send both to an LLM with a prompt asking for compliance analysis
4. Display the LLM's assessment (compliant/non-compliant with reasoning)

### **Alternatives Considered**
- Rule-based static analysis: Too rigid and requires manual rule definition for each ADR
- Full codebase analysis: Too complex for initial implementation
- Multiple file analysis: Adds complexity that can be addressed in future phases

### **Acceptance Criteria**
- [ ] CLI accepts `--adr` and `--file` parameters
- [ ] ADR file is successfully read and parsed
- [ ] Code file is successfully read
- [ ] LLM integration provides compliance assessment
- [ ] Results are displayed in a user-friendly format
- [ ] Error handling for missing files or LLM failures
- [ ] Unit tests cover the core functionality
- [ ] E2E tests verify CLI behavior

### **Additional Context**
This is Phase 1 of a larger compliance checking system. Future phases will expand scope and capabilities including directory-based checking, git integration for diff analysis, smart ADR selection, and automated rule generation with caching for improved performance.

The implementation should follow existing architectural patterns (service layer, dependency injection) established in the codebase.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.