export const certify = {
    name: "certify",
    description: "Full enterprise certification pipeline — runs all agents and produces certification",
    content: `Run the complete enterprise certification pipeline.

## Overview

This command orchestrates a multi-agent validation process to certify a codebase for enterprise deployment. Multiple specialized agents run in parallel, cross-verify findings, and an adversarial red team validates the results.

## Process

### Phase 1: Initialize Certification
- Generate certification ID: cert-{project}-{timestamp}
- Create certification directory: .vaspera/certifications/{id}/
- Call certification_start to initialize

### Phase 2: Parallel Agent Execution
Run these agents IN PARALLEL (use Claude Code's Task tool with multiple agents):

1. **Security Agent** - Run /certification-security
2. **Reliability Agent** - Run /certification-reliability
3. **TypeSafety Agent** - Run /certification-typesafety
4. **Performance Agent** - Run /certification-performance
5. **Quality Agent** - Run /certification-quality

Each agent scans the codebase and outputs findings. There are two modes:

**Option A: Direct MCP (if running in main session)**
- Agents call agent_submit_finding for each finding
- Agents call agent_complete with summary

**Option B: JSON Output (if running as subagents via Task tool)**
Since subagents don't have MCP tool access, they output findings as JSON.
After ALL agents complete, YOU (the main orchestrator) must submit findings using ONE of these methods:

**Method 1: Batch Submit (Recommended)**
- Call agent_batch_submit for each agent's output
- Pass the findings array and summary directly
- This handles all submissions in one call per agent

**Method 2: Individual Submit**
1. Parse the JSON output from each subagent's response
2. Call agent_submit_finding for EACH finding from each agent
3. Call agent_complete for each agent's summary

The JSON format each agent outputs:
\`\`\`json
{
  "agent": "security",
  "findings": [
    { "id": "sec-001", "severity": "high", "category": "...", "description": "...", "evidence": "...", "confidence": 85 }
  ],
  "summary": {
    "total_findings": 5,
    "by_severity": { "critical": 0, "high": 2, "medium": 2, "low": 1, "info": 0 },
    "confidence_score": 85,
    "coverage_areas": ["auth", "input-validation"]
  }
}
\`\`\`

Submit findings via agent_batch_submit or individual tools before proceeding to Phase 3

### Phase 3: Cross-Verification
After all 5 agents complete, critical findings must be cross-verified:

**Option A: Automatic (Recommended)**
- Call certification_cross_verify with mode: "auto"
- System automatically verifies critical findings based on agent domain overlap
- Security findings verified by Reliability + RedTeam
- Reliability findings verified by Security + Quality
- TypeSafety findings verified by Quality + Performance
- Performance findings verified by Reliability + Quality
- Quality findings verified by TypeSafety + Reliability

**Option B: Manual**
- Use agent_cross_verify for individual findings
- Required when auto-verification cannot determine validity

**Note:** certification_consensus will auto-trigger cross-verification if blocked

### Phase 4: Red Team
- Run /certification-redteam agent
- Has access to all prior findings
- Challenges clean areas
- Submits new findings and disputes

### Phase 5: Consensus Calculation
- Call certification_consensus to calculate scores
- Auto-cross-verification runs if needed (enabled by default)
- Weighted scoring: Security 30%, Reliability 25%, TypeSafety 15%, Performance 15%, Quality 10%, RedTeam 5%
- Determine certification level

### Phase 6: Finalize
- Call certification_finalize
- Generate CERTIFICATION.md with full report
- Generate CERTIFICATION.json for machine reading

## Certification Levels

| Level | Score | Criteria |
|-------|-------|----------|
| CERTIFIED | 90-100 | No critical/high issues, red team clear |
| APPROVED | 70-89 | No critical, high mitigated |
| REVIEW_REQUIRED | 40-69 | Multiple issues, action required |
| BLOCKED | 0-39 | Critical vulnerabilities found |

## Output

After completion:
- .vaspera/certifications/{id}/ - Full audit trail
- CERTIFICATION.md - Human-readable report
- CERTIFICATION.json - Machine-readable data

## Important

- Do NOT skip any agent
- Cross-verification is required for critical findings
- Red team must complete before finalization
- Certification expires after 30 days OR when project files change (whichever comes first)`
};
//# sourceMappingURL=certify.js.map