Consensus Coordinator
The Legal Consensus Coordinator (AG-LEGAL-CONSENSUS) collects findings from all legal analyzers, validates them against the project type, votes on confidence, and produces the final prioritized Legal Risk Report.
Capabilities
- Project Type Detection: Automatically determine if project is SaaS, e-commerce, healthcare, etc.
- Finding Collection: Parse and normalize outputs from all 9 legal analyzers
- Relevance Filtering: Exclude findings irrelevant to the detected project type
- Confidence Voting: Score findings based on multi-analyzer agreement
- Conflict Resolution: When analyzers disagree, investigate and decide
- Report Generation: Produce prioritized, actionable Legal Risk Report
- Remediation Checklist: Generate step-by-step fix list with effort estimates
- False Positive Elimination: Filter out findings that don't apply to the project context
When to Use
The Legal Consensus Coordinator is automatically invoked by the /code:legal command after all analyzers complete. You typically don't invoke it directly.
How It Works
- Detect Project Type: Reads codebase to determine application type (SaaS, e-commerce, etc.)
- Collect Findings: Parses all analyzer outputs into normalized structure
- Filter by Relevance: Excludes findings irrelevant to the detected project type
- Vote on Confidence: Multiple analyzers flagging same issue = higher confidence
- Resolve Conflicts: When analyzers disagree, investigates and decides
- Generate Report: Produces prioritized, actionable Legal Risk Report
Confidence Scoring
| Confidence | Criteria | Priority |
|---|---|---|
| CONFIRMED | 2+ analyzers independently identified the same issue | High - fix immediately |
| LIKELY | 1 analyzer with strong evidence (specific code location, clear regulation) | Medium - fix this sprint |
| INVESTIGATE | 1 analyzer with circumstantial evidence | Low - verify manually |
Project Type Filtering
The consensus coordinator adjusts findings based on detected project type:
| Project Type | Key Indicators | Most Relevant Analyzers |
|---|---|---|
| SaaS | Subscription billing, user accounts | Privacy, Terms, Security, AI |
| E-commerce | Shopping cart, checkout, products | Consumer, Terms, Privacy, Security |
| Healthcare | Patient data, HIPAA references | Privacy, Security, Terms, A11y |
| Social/UGC | User posts, uploads, profiles | Content, Privacy, Consumer, A11y |
| Static/Blog | No user data, informational | A11y, Licensing |
| AI/ML App | AI API calls, model inference | AI, Privacy, Terms, Consumer |
Example Output
LEGAL RISK REPORT
Generated: 2026-02-14
Project Type: SaaS Application (detected)
RISK SUMMARY
| Risk Level | Count |
|------------|-------|
| Critical | 2 |
| High | 3 |
| Medium | 4 |
| Low | 1 |
Total: 10 findings (3 false positives excluded)
FIX BEFORE LAUNCH (Critical)
1. [CONFIRMED] No privacy policy but collecting email
Flagged by: Privacy Analyzer, Terms Analyzer
Location: app/page.tsx:42
Legal Basis: GDPR Art. 13, CCPA 1798.130
Remediation: Create /privacy page, link from footer
2. [CONFIRMED] Images without alt text (12 instances)
Flagged by: A11y Analyzer
Location: components/*.tsx
Legal Basis: ADA Title III, WCAG 2.1 AA
Remediation: Add descriptive alt attributes
FALSE POSITIVES EXCLUDED:
- PIPL data localization (no Chinese users detected)
- DMCA designated agent (no user-uploaded content)
- PCI-DSS encryption (no payment processing)
Key Behaviors
- Context Sensitivity: Filters findings based on what the project actually does
- Multi-Analyzer Agreement: Higher confidence when multiple analyzers agree
- False Positive Reduction: Actively removes irrelevant findings to reduce noise
- Actionable Output: Every finding includes specific remediation steps
- Priority Ordering: Report organized by fix urgency (critical first)
- Effort Estimates: Include approximate time to remediate each finding
Tools Available
- Read, Write, Edit (file operations for report generation)
- Glob, Grep (search for project type indicators)
Related Agents
legal-analyzer-privacy- Privacy and data protection findingslegal-analyzer-terms- Terms and legal document findingslegal-analyzer-a11y- Accessibility compliance findingslegal-analyzer-licensing- License and IP findingslegal-analyzer-consumer- Consumer protection findingslegal-analyzer-security- Security obligation findingslegal-analyzer-ai- AI compliance findingslegal-analyzer-content- Content and IP findingslegal-analyzer-international- International compliance findings
Coordination
The Legal Consensus Coordinator:
- Receives from: All 9 legal analyzers
- Produces: Final Legal Risk Report saved to
docs/08-project/legal-audits/ - Architecture: Mirrors the logic-consensus pattern used by
/code:logic