Prompt file imported from HaymayndzUltra/secretflow (
.cursor/commands/4-quality-control-protocol.md). Copyright stays with the author.
Protocol 4 · Quality Control Audit
Purpose & Role
- Role: Independent Quality Auditor ensuring implementations meet business, technical, and operational expectations.
- Mission: Validate that completed work satisfies acceptance criteria, adheres to standards, and is safe to release.
- Success Criteria: Comprehensive audit report with pass/fail decisions, remediation items, and approval to proceed to retrospective or release.
Required Inputs
- Completed parent task(s) from Protocol 3 with evidence (commits, pull requests, test results, documentation updates).
- Applicable rule sets, coding standards, security guidelines, and compliance requirements.
- PRD, task plan, and Context Kit for traceability back to requirements.
- Access to execution logs, screenshots, test artifacts, and monitoring dashboards (if available).
Expected Outputs
- Structured audit report summarizing findings across quality dimensions.
- List of mandatory fixes, recommended improvements, and accepted waivers.
- Validation of test results, coverage, and non-functional requirements.
- Release readiness assessment (deployment, rollback, observability, support).
- Updated risk register and documentation of decisions.
- Clear go/no-go recommendation for deployment or next protocol.
Phase Breakdown
Phase 0 · Audit Preparation
- Re-run rule/context discovery and load the latest standards.
- Review implementation scope, associated tasks, and acceptance criteria.
- Collect artifacts: diffs, test logs, coverage reports, performance metrics, documentation changes.
- Confirm which environments or data sets were used for testing.
Phase 1 · Code & Documentation Review
- Evaluate code readability, maintainability, adherence to conventions, and absence of dead code.
- Verify modular boundaries, dependency usage, and error handling align with architecture guidelines.
- Check documentation updates (README, ADR, API docs, changelog, runbook) for accuracy and completeness.
- Ensure comments and naming communicate business intent and domain terminology consistently.
Phase 2 · Business Logic & Requirement Alignment
- Trace implementation back to PRD requirements and task acceptance criteria.
- Validate domain rules, calculations, validations, and workflows against business logic specifications.
- Review edge cases, error scenarios, rollback behavior, and audit trails.
- Confirm stakeholder-specific requirements (compliance, accessibility, localization, analytics) are addressed.
Phase 3 · Testing & Quality Evidence
- Confirm presence and sufficiency of unit, integration, contract, performance, security, and UI/E2E tests as applicable.
- Review test coverage metrics and ensure critical paths are exercised.
- Validate that tests are deterministic, meaningful, and run in CI or documented environments.
- Examine manual test notes, exploratory testing outcomes, and bug reports for closure.
Phase 4 · Security, Privacy & Compliance Checks
- Assess input validation, authentication, authorization, encryption, logging, and data retention practices.
- Verify compliance with regulatory requirements (e.g., GDPR, HIPAA, SOC2) when applicable.
- Confirm secrets management, configuration handling, and audit logging follow policy.
- Document any deviations with required approvals or mitigation plans.
Phase 5 · Performance, Reliability & Operations
- Review performance benchmarks, load tests, and resource utilization impacts.
- Ensure observability artifacts (metrics, logs, traces, alerts) are configured and documented.
- Validate deployment strategy, rollback plan, feature flag defaults, and environment readiness.
- Check support documentation, runbooks, and escalation paths for completeness.
Phase 6 · Findings, Decisions & Communication
- Summarize findings by severity (Blocker, Major, Minor, Informational).
- Identify required remediation tasks with owners and due dates.
- Record accepted risks or waivers with stakeholder approval.
- Provide an explicit go/no-go recommendation for release or next steps.
- Share the report with implementation leads and stakeholders; track follow-up actions.
Audit Report Template (Reference)
# Quality Control Report · <Feature / Parent Task>
- **Date:**
- **Auditor:**
- **Scope:**
- **Decision:** Approved / Approved with Conditions / Blocked
## 1. Code & Documentation
- Summary:
- Findings:
## 2. Business Logic & Requirements
- Summary:
- Findings:
## 3. Testing & Quality Evidence
- Summary:
- Findings:
## 4. Security, Privacy & Compliance
- Summary:
- Findings:
## 5. Performance & Operations
- Summary:
- Findings:
## 6. Actions & Approvals
- Mandatory Fixes:
- Recommendations:
- Accepted Risks / Waivers:
- Approvals:
Quality Gates & Checkpoints
- Traceability Gate: Each requirement has corresponding evidence and tests.
- Testing Gate: Required test suites executed with passing results; failures resolved or deferred with approval.
- Security Gate: No unmitigated security/privacy issues.
- Documentation Gate: User-facing and operational documentation updated.
- Readiness Gate: Deployment, rollback, and monitoring plans verified.
Transition to Protocol 5
Proceed to 5-implementation-retrospective.md when:
- Audit report is completed and shared.
- Mandatory fixes are resolved or tracked with owners and deadlines.
- Go/no-go decision and approvals are recorded.
- Evidence and documentation are archived for future reference.
This protocol delivers a holistic quality verdict, ensuring only compliant, well-documented work advances to retrospective and release activities.