fn generate_checklist(task_id: &str, task_type: QaTaskType) -> QaChecklist {
    let type_str = match task_type {
        QaTaskType::Feature => "feature",
        QaTaskType::Bugfix => "bugfix",
        QaTaskType::Refactor => "refactor",
        QaTaskType::Docs => "docs",
        QaTaskType::Performance => "performance",
        QaTaskType::Security => "security",
    };

    QaChecklist {
        task_id: task_id.to_string(),
        task_type: type_str.to_string(),
        generated: Utc::now(),
        categories: ChecklistCategories {
            safety_ethics: vec![
                ChecklistItem {
                    id: "A1".into(),
                    description: "No hardcoded secrets or credentials".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "A2".into(),
                    description: "Error handling covers all failure modes".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
                ChecklistItem {
                    id: "A3".into(),
                    description: "Input validation prevents injection attacks".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "A4".into(),
                    description: "Logging doesn't expose sensitive data".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "A5".into(),
                    description: "Rate limiting considered for APIs".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
            ],
            code_quality: vec![
                ChecklistItem {
                    id: "B1".into(),
                    description: "Cyclomatic complexity <= 10".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "B2".into(),
                    description: "Cognitive complexity <= 15".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "B3".into(),
                    description: "Test coverage >= 95%".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "B4".into(),
                    description: "Mutation score >= 80%".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "B5".into(),
                    description: "No new clippy warnings".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
            ],
            testing: vec![
                ChecklistItem {
                    id: "C1".into(),
                    description: "Unit tests cover happy path".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
                ChecklistItem {
                    id: "C2".into(),
                    description: "Unit tests cover error paths".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
                ChecklistItem {
                    id: "C3".into(),
                    description: "Property tests for complex logic".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
                ChecklistItem {
                    id: "C4".into(),
                    description: "Integration tests for API boundaries".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
                ChecklistItem {
                    id: "C5".into(),
                    description: "Golden tests for output formats".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
            ],
            documentation: vec![
                ChecklistItem {
                    id: "D1".into(),
                    description: "Public API documented".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "D2".into(),
                    description: "Examples provided in docs".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
                ChecklistItem {
                    id: "D3".into(),
                    description: "CHANGELOG updated".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "D4".into(),
                    description: "README reflects changes".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
                ChecklistItem {
                    id: "D5".into(),
                    description: "Error messages are actionable".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
            ],
            process: vec![
                ChecklistItem {
                    id: "E1".into(),
                    description: "All acceptance criteria met".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
                ChecklistItem {
                    id: "E2".into(),
                    description: "Commit messages reference ticket".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "E3".into(),
                    description: "PR description complete".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
                ChecklistItem {
                    id: "E4".into(),
                    description: "CI/CD passes all gates".into(),
                    checked: false,
                    automated: true,
                    evidence: None,
                },
                ChecklistItem {
                    id: "E5".into(),
                    description: "Peer review completed".into(),
                    checked: false,
                    automated: false,
                    evidence: None,
                },
            ],
        },
    }
}

