export const GATE_CATALOG = [
    // Security gates (15)
    {
        id: 'sec-sql-injection',
        category: 'security',
        title: 'All DB queries use parameterized queries or ORM — no string interpolation in SQL',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'sec-input-validation',
        category: 'security',
        title: 'All user inputs validated with Zod/Pydantic/schema at system boundaries',
        stacks: ['typescript', 'python', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'sec-auth-check',
        category: 'security',
        title: 'All endpoints/routes require authentication check before processing',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature', 'infra'],
    },
    {
        id: 'sec-sensitive-data',
        category: 'security',
        title: 'No PII or secrets logged to console/file — use redaction or masking',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'sec-cors',
        category: 'security',
        title: 'CORS configured explicitly — no wildcard origin in production',
        stacks: ['typescript', 'python', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature', 'infra'],
    },
    {
        id: 'sec-rate-limit',
        category: 'security',
        title: 'Rate limiting applied to all public endpoints',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['high'],
        specTypes: ['feature', 'infra'],
    },
    {
        id: 'sec-xss',
        category: 'security',
        title: 'All user-generated content escaped before rendering in HTML',
        stacks: ['typescript', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature'],
    },
    {
        id: 'sec-csrf',
        category: 'security',
        title: 'CSRF tokens required for state-changing operations in browser context',
        stacks: ['typescript', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature'],
    },
    {
        id: 'sec-dependency-check',
        category: 'security',
        title: 'No new dependencies with known critical vulnerabilities (npm audit / pip audit)',
        stacks: ['typescript', 'python', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'sec-env-secrets',
        category: 'security',
        title: 'No secrets hardcoded — all credentials via environment variables',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'sec-error-disclosure',
        category: 'security',
        title: 'Error responses do not expose internal stack traces or system details to clients',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'sec-jwt-validation',
        category: 'security',
        title: 'JWT tokens validated for signature, expiry, and issuer on every protected route',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['high'],
        specTypes: ['feature', 'infra'],
    },
    {
        id: 'sec-file-upload',
        category: 'security',
        title: 'File uploads: type validation, size limits, and virus scanning configured',
        stacks: ['typescript', 'python', 'generic'],
        riskLevels: ['high'],
        specTypes: ['feature'],
    },
    {
        id: 'sec-path-traversal',
        category: 'security',
        title: 'File system paths sanitized — no user-controlled path traversal possible',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature', 'infra'],
    },
    {
        id: 'sec-https-only',
        category: 'security',
        title: 'All external API calls use HTTPS — no HTTP in production',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['all'],
    },
    // Testing gates (10)
    {
        id: 'test-unit-coverage',
        category: 'testing',
        title: 'Unit tests cover ≥95% branch coverage for all new modules',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'test-integration',
        category: 'testing',
        title: 'Integration test for each external dependency interaction (API, DB, cache)',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature', 'infra'],
    },
    {
        id: 'test-happy-path',
        category: 'testing',
        title: 'Happy path test for each acceptance criterion',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'test-error-paths',
        category: 'testing',
        title: 'Error path tests: invalid input, network failure, not-found cases',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'test-edge-cases',
        category: 'testing',
        title: 'Edge case tests: empty input, maximum values, concurrent operations',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature'],
    },
    {
        id: 'test-no-mocks-abuse',
        category: 'testing',
        title: 'Tests do not mock the unit under test — only external dependencies mocked',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'test-deterministic',
        category: 'testing',
        title: 'All tests are deterministic — no random data, flaky network, or time-dependent state',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'test-ci-passes',
        category: 'testing',
        title: 'All tests pass in CI environment without manual intervention',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'test-performance-regression',
        category: 'testing',
        title: 'Performance regression test: response time within 10% of baseline',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['high'],
        specTypes: ['feature'],
    },
    {
        id: 'test-snapshot',
        category: 'testing',
        title: 'Snapshot tests for all UI components and generated outputs',
        stacks: ['typescript', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature'],
    },
    // Architecture gates (10)
    {
        id: 'arch-layer-violation',
        category: 'architecture',
        title: 'No cross-layer imports: frontend does not import from backend modules directly',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'arch-ai-spec-assurance',
        category: 'architecture',
        title: 'AI-generated specs are checked against original user intent before implementation',
        stacks: ['typescript', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['feature', 'bugfix', 'infra', 'all'],
    },
    {
        id: 'arch-new-code-domain-inference',
        category: 'architecture',
        title: 'New code does not infer product-domain requirements from incidental paths or stack presence',
        stacks: ['typescript', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['feature', 'bugfix', 'infra', 'all'],
    },
    {
        id: 'arch-mcp-startup-assurance',
        category: 'architecture',
        title: 'MCP startup verifies official tools in first tools/list and excludes bootstrap-only tools',
        stacks: ['typescript', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['feature', 'bugfix', 'infra', 'all'],
    },
    {
        id: 'arch-single-responsibility',
        category: 'architecture',
        title: 'Each module/class has single responsibility — max 1 reason to change',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'arch-no-god-object',
        category: 'architecture',
        title: 'No god objects — functions max 80 lines, files max 400 lines',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'arch-dependency-injection',
        category: 'architecture',
        title: 'External dependencies injected (not imported directly) for testability',
        stacks: ['typescript', 'python', 'java', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature'],
    },
    {
        id: 'arch-no-circular',
        category: 'architecture',
        title: 'No circular module dependencies — verified with madge or similar',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['low', 'medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'arch-api-contract',
        category: 'architecture',
        title: 'API contracts (request/response) defined with typed schemas before implementation',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature'],
    },
    {
        id: 'arch-error-boundaries',
        category: 'architecture',
        title: 'Error boundaries defined at module edges — errors do not propagate silently',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['all'],
    },
    {
        id: 'arch-backward-compat',
        category: 'architecture',
        title: 'No breaking changes to existing public APIs without major version bump',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['refactor'],
    },
    {
        id: 'arch-logging',
        category: 'architecture',
        title: 'Structured logging with request ID / correlation ID for all operations',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature', 'infra'],
    },
    {
        id: 'arch-config-externalized',
        category: 'architecture',
        title: 'All configuration externalized — no magic strings/numbers in business logic',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['all'],
    },
    // Performance gates (8)
    {
        id: 'perf-lcp',
        category: 'performance',
        title: 'LCP (Largest Contentful Paint) ≤2.5s on 4G mobile connection',
        stacks: ['typescript', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature'],
    },
    {
        id: 'perf-no-n-plus-1',
        category: 'performance',
        title: 'No N+1 query patterns — use batching, DataLoader, or eager loading',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature'],
    },
    {
        id: 'perf-bundle-size',
        category: 'performance',
        title: 'JavaScript bundle size increase <50KB gzipped per feature',
        stacks: ['typescript', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature'],
    },
    {
        id: 'perf-db-indexes',
        category: 'performance',
        title: 'Database queries on new tables use appropriate indexes',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature', 'infra'],
    },
    {
        id: 'perf-caching',
        category: 'performance',
        title: 'Expensive computations (>100ms) cached with appropriate TTL',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['high'],
        specTypes: ['feature'],
    },
    {
        id: 'perf-async',
        category: 'performance',
        title: 'No synchronous blocking I/O in hot paths — all disk/network operations async',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature', 'infra'],
    },
    {
        id: 'perf-pagination',
        category: 'performance',
        title: 'All list endpoints paginated — no unbounded queries returning full table',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature'],
    },
    {
        id: 'perf-timeout',
        category: 'performance',
        title: 'Timeout configured for all external API calls — no indefinite waits',
        stacks: ['typescript', 'python', 'java', 'go', 'generic'],
        riskLevels: ['medium', 'high'],
        specTypes: ['feature', 'infra'],
    },
];
//# sourceMappingURL=gate-catalog.js.map