prprompts-flutter-generator
Version:
AI-powered Flutter development with full automation + official extension support - Generate 32 security-audited guides & auto-implement in 2-3 hours. NEW v5.1: Official Claude Code plugin with hooks, Gemini TOML commands, Qwen MCP settings. Features: Comp
410 lines (319 loc) β’ 13.2 kB
Markdown
name: qa-check
description: "[prprompts] Comprehensive compliance audit - generates QA_REPORT.md with score"
category: Automation
version: 4.0.0
tags: [prprompts, qa, compliance, audit, security]
badge: NEW
# /qa-check - Comprehensive Compliance Audit
π **v4.0 Automation** - Complete quality assurance and compliance audit. Generates detailed `QA_REPORT.md` with scores, findings, and recommendations.
## Usage
```bash
/qa-check
```
Or with specific compliance framework:
```bash
/qa-check --framework hipaa
/qa-check --framework pci-dss
/qa-check --framework gdpr
```
## What It Does
Performs comprehensive audit across 8 categories:
### 1. Architecture Compliance (15%)
- Clean Architecture structure
- Feature separation
- Dependency flow (presentation β domain β data)
- Layer isolation
### 2. Code Quality (15%)
- Static analysis (flutter analyze)
- Linting rules
- Code formatting
- Complexity metrics
- Duplicate code detection
### 3. Testing (20%)
- Test coverage (β₯85%)
- Unit test quality
- Widget test coverage
- Integration test coverage
- Test naming conventions
### 4. Security (20%)
- Dependency vulnerabilities
- Hardcoded secrets
- Encryption implementation
- Authentication flows
- Authorization checks
- Input validation
- Secure storage usage
### 5. Compliance (15%)
- HIPAA rules (if applicable)
- PCI-DSS rules (if applicable)
- GDPR rules (if applicable)
- Custom compliance rules
- Audit logging
- Data retention policies
### 6. Performance (5%)
- App startup time
- Frame rendering (60fps)
- Memory usage
- Network efficiency
- Build size
### 7. Accessibility (5%)
- Semantic labels
- Screen reader support
- Color contrast
- Font scaling
- Keyboard navigation
### 8. Documentation (5%)
- Code comments
- README completeness
- API documentation
- Architecture diagrams
- Deployment guides
## Example Session
```
/qa-check
π Starting Comprehensive QA Audit...
Project: HealthTracker Pro
Compliance Frameworks: HIPAA, GDPR
Date: 2025-01-15 14:23:45
ββββββββββββββββββββββββββββββββββββββββββββββββββ
1. Architecture Compliance (15%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β Clean Architecture structure
β Feature modules properly separated
β Dependency flow correct (presentation β domain β data)
β No circular dependencies
β Repository pattern implemented
β Use case single responsibility
β Minor: 2 presentation files importing data layer directly
Score: 14/15 (93%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
2. Code Quality (15%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Running flutter analyze...
β 0 errors
β 2 warnings (acceptable)
β All files formatted (dart format)
β Cyclomatic complexity avg: 4.2 (max: 8, target: <10)
β No duplicate code detected
β Naming conventions followed
Warnings:
lib/features/auth/presentation/pages/login_page.dart:47
- Prefer const constructors
Score: 14/15 (93%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
3. Testing (20%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Running tests...
β Unit tests: 247 passed, 0 failed
β Widget tests: 83 passed, 0 failed
β Integration tests: 23 passed, 0 failed
Coverage Analysis:
β Overall: 87.3% (target: 85%)
- lib/core/: 91.2%
- lib/features/auth/: 89.4%
- lib/features/appointments/: 87.1%
- lib/features/messaging/: 85.3%
- lib/features/records/: 82.7% β Below target
β Test naming conventions
β Arrange-Act-Assert pattern
β Mock usage appropriate
Issues:
- Medical records feature below 85% coverage
Score: 18/20 (90%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
4. Security (20%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Dependency Scan:
β 0 critical vulnerabilities
β 0 high vulnerabilities
β 2 medium vulnerabilities (non-blocking)
Code Security Scan:
β No hardcoded secrets
β No hardcoded passwords/API keys
β PHI encrypted with AES-256-GCM
β Tokens stored in secure_storage
β JWT RS256 implementation correct
β Certificate pinning configured
β Biometric auth secured
β Input validation on all forms
β SQL injection prevention (parameterized queries)
β XSS prevention (HTML sanitization)
Authentication & Authorization:
β JWT token expiry: 15 min (acceptable)
β Refresh token rotation implemented
β Role-based access control (RBAC)
β Multi-factor authentication (MFA) supported
Issues:
- 2 medium vulnerabilities in dependencies:
1. http 0.13.5 (update to 1.1.0)
2. intl 0.17.0 (update to 0.18.0)
Score: 18/20 (90%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
5. Compliance - HIPAA (15%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Technical Safeguards:
β Access Controls (Β§164.312(a)(1))
- Unique user identification
- Emergency access procedure
- Automatic logoff (15 min)
- Encryption and decryption
β Audit Controls (Β§164.312(b))
- All PHI access logged
- Audit logs encrypted
- Log retention: 6 years
β Integrity Controls (Β§164.312(c)(1))
- Mechanism to authenticate PHI
- Digital signatures on records
β Transmission Security (Β§164.312(e)(1))
- TLS 1.3 for data in transit
- End-to-end encryption for messaging
Physical Safeguards:
β Device and Media Controls (Β§164.310(d)(1))
- Data disposal (secure deletion)
- Media re-use (data wiping)
Administrative Safeguards:
β Security Management Process (Β§164.308(a)(1))
- Risk analysis documented β
- Risk management plan β
- Sanction policy β Missing
- Information system activity review β
Issues:
- Missing sanction policy documentation
Score: 14/15 (93%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
6. Performance (5%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β Cold start time: 1.8s (target: <2s)
β Frame rate: 60fps (no jank detected)
β Memory usage: 147MB avg (acceptable for healthcare app)
β Network efficiency: Request caching implemented
β App size: 23.4MB (Android APK)
β Build time: 42s (release build)
Score: 5/5 (100%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
7. Accessibility (5%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β Semantic labels on all interactive widgets
β Screen reader tested (TalkBack/VoiceOver)
β Color contrast ratio β₯4.5:1
β Font scaling supported (up to 200%)
β Keyboard navigation incomplete (2 screens missing)
Score: 4/5 (80%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
8. Documentation (5%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β README.md comprehensive
β API documentation (35% of public APIs)
β Architecture diagram exists
β Deployment guide exists
β Code comment coverage: 67% (target: 80%)
Score: 4/5 (80%)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π― Overall QA Score: 91/100 (91%)
Grade: A
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π Category Breakdown:
1. Architecture Compliance: 93% [ββββββββββ]
2. Code Quality: 93% [ββββββββββ]
3. Testing: 90% [ββββββββββ]
4. Security: 90% [ββββββββββ]
5. Compliance (HIPAA): 93% [ββββββββββ]
6. Performance: 100% [ββββββββββ]
7. Accessibility: 80% [ββββββββββ]
8. Documentation: 80% [ββββββββββ]
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π΄ Critical Issues (0):
None
π‘ Warnings (5):
1. 2 presentation files importing data layer directly
2. Medical records feature test coverage: 82.7% (target: 85%)
3. 2 medium dependency vulnerabilities
4. Missing HIPAA sanction policy documentation
5. Code comment coverage: 67% (target: 80%)
β
Recommendations:
1. Fix layer violations in presentation files
2. Add tests to medical records feature (need 2.3% more)
3. Update dependencies: http, intl
4. Document sanction policy in docs/COMPLIANCE.md
5. Add code comments to public APIs
6. Complete keyboard navigation for 2 screens
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π Report saved to: QA_REPORT.md
β¨ Great work! Your app is production-ready with minor improvements needed.
Next Steps:
1. Review QA_REPORT.md
2. Fix warnings (estimated: 2 hours)
3. Re-run /qa-check to verify fixes
4. Deploy to staging environment
```
## Generated Report
Creates `QA_REPORT.md` with:
- **Executive Summary:** Overall score and grade
- **Category Scores:** Detailed breakdown with progress bars
- **Critical Issues:** Must-fix items
- **Warnings:** Should-fix items
- **Recommendations:** Best practice improvements
- **Detailed Findings:** Per-category analysis
- **Compliance Matrices:** Framework-specific checklists
- **Trend Analysis:** Comparison with previous audits
- **Action Items:** Prioritized TODO list
## Grading Scale
| Score | Grade | Status |
|-------|-------|--------|
| 95-100% | A+ | Excellent - Production ready |
| 90-94% | A | Great - Minor improvements |
| 85-89% | B+ | Good - Some work needed |
| 80-84% | B | Acceptable - Several issues |
| 75-79% | C+ | Fair - Significant work needed |
| 70-74% | C | Passing - Major improvements required |
| <70% | F | Failing - Not production ready |
## Compliance Frameworks
### HIPAA (Healthcare)
- Technical safeguards
- Physical safeguards
- Administrative safeguards
- Breach notification
- Business associate agreements
### PCI-DSS (Payment Cards)
- Build and maintain secure network
- Protect cardholder data
- Maintain vulnerability management
- Implement strong access controls
- Monitor and test networks
- Maintain information security policy
### GDPR (Privacy)
- Lawfulness, fairness, transparency
- Purpose limitation
- Data minimization
- Accuracy
- Storage limitation
- Integrity and confidentiality
- Accountability
## Options
| Option | Description |
|--------|-------------|
| `--framework <name>` | Focus on specific compliance framework |
| `--category <name>` | Audit specific category only |
| `--verbose` | Include detailed explanations |
| `--fix-suggestions` | Generate code fixes for issues |
| `--compare <tag>` | Compare with previous audit |
## Requirements
- **Flutter SDK:** Installed
- **Project:** Must be a Flutter project
- **Tests:** Test infrastructure recommended
## Related Commands
- `/review-and-commit` - Pre-commit validation
- `/implement-next` - Implement features
- `/full-cycle` - Auto-implement multiple features
- `/bootstrap-from-prprompts` - Initial setup
## Automation Integration
Use in CI/CD:
```yaml
- name: QA Check
run: gemini qa-check --ci --min-score 85
```
Fails build if score < 85%.
**Powered by PRPROMPTS v4.0** | **Quality Assurance** | [Docs](https://github.com/Kandil7/prprompts-flutter-generator#readme)