You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Quality Profiles — preset and configurable rule sets that define what Cora focuses on during review. Different projects need different review strictness: a security-critical API needs stricter review than a prototype experiment.
Currently Cora has no preset system — every project manually configures .cora.yaml from scratch
Discoverability problem — new users don't know what to put in .cora.yaml. Presets give them a starting point
Consistency across repos — team can share one profile and apply it to all repos
Proposed Design
Built-in Profiles
$ cora profile list
Available profiles:
┌─────────────────┬─────────────────────────────────────────────────┐
│ Profile │ Description │
├─────────────────┼─────────────────────────────────────────────────┤
│ security-first │ Strict security focus — zero tolerance for │
│ │ vulnerabilities, secrets, injection risks │
├─────────────────┼─────────────────────────────────────────────────┤
│ performance │ Focus on speed, memory, allocation patterns │
│ │ Best for hot-path and critical section code │
├─────────────────┼─────────────────────────────────────────────────┤
│ clean-code │ Broad quality — readability, naming, complexity │
│ │ Best for team projects with style standards │
├─────────────────┼─────────────────────────────────────────────────┤
│ beginner-friendly│ Gentle review — focus on common mistakes, │
│ │ learning opportunities, explanatory comments │
├─────────────────┼─────────────────────────────────────────────────┤
│ minimal │ Only critical + security, nothing else │
│ │ Best for quick PRs and hotfixes │
├─────────────────┼─────────────────────────────────────────────────┤
│ rust-strict │ Rust-specific: unsafe, unwrap, panic, lifetime │
│ │ error handling, idiomatic patterns │
├─────────────────┼─────────────────────────────────────────────────┤
│ typescript-strict│ TS-specific: any types, null safety, proper │
│ │ typing, async patterns │
├─────────────────┼─────────────────────────────────────────────────┤
│ go-pragmatic │ Go-specific: error handling, goroutine safety │
│ │ interface design, idiomatic Go │
└─────────────────┴─────────────────────────────────────────────────┘
Profile Definition Format
Each profile is a YAML file that defines focus areas, weights, and review behavior:
# profiles/security-first.yamlname: security-firstdescription: "Strict security focus — zero tolerance for vulnerabilities"version: "1.0"focus_areas:
- id: securityweight: 10# review priority (1-10)action: block # block = any finding → failrules:
- "No hardcoded secrets or credentials"
- "Validate all external inputs"
- "Use parameterized queries, never string interpolation"
- "Check authorization on every endpoint"
- "Sanitize user-generated content"
- id: injectionweight: 10action: blockrules:
- "No SQL/NoSQL/XSS/SSRF injection vectors"
- "Escape all output in templates"
- "Use ORM/query builder, never raw queries"
- id: error_handlingweight: 7action: warnrules:
- "Never expose stack traces to users"
- "Log security events properly"
- "Handle all error paths explicitly"ignore_areas:
- style
- naming
- documentationseverity_override:
# Upgrade severity for specific patternshardcoded_value: critical # normally medium → critical in security profiletodo_comment: ignore # normally low → ignorereview_style:
tone: strict # strict | standard | gentledetail_level: high # minimal | standard | high | exhaustivesuggest_fixes: true # always suggest remediationmax_findings: null # no limit — report everything
.cora.yaml Usage
# Option 1: Use built-in profileprofile: security-first# Option 2: Extend built-in profile with overridesprofile:
extends: security-firstoverrides:
focus_areas:
- id: complianceweight: 8action: warnrules:
- "Include data processing consent checks"
- "Log PII access events"ignore_areas:
- style# Option 3: Custom profile from fileprofile: ./my-team-profile.yaml# Option 4: Inline custom (no file needed)profile:
name: "trapfall-security"focus_areas:
- id: unsafe_rustweight: 10action: blockrules:
- "No unsafe blocks without safety comment"
- "No unwrap() in production code paths"
- id: cryptoweight: 10action: blockrules:
- "Use constant-time comparison for secrets"
- "Never roll custom crypto"ignore_areas:
- documentation
- test_style
CLI Commands
# List available profiles
cora profile list
# Show profile details
cora profile show security-first
# Validate a custom profile
cora profile validate ./my-profile.yaml
# Generate a profile interactively
cora profile init
# → What language? [Rust/TypeScript/Go/Python/...]# → Primary focus? [Security/Performance/Clean Code/All]# → Strictness? [Strict/Standard/Gentle]# → Generated: .cora/profile.yaml# Preview what a profile would flag (dry-run against existing codebase)
cora profile preview security-first
Profile Resolution Order
1. Inline .cora.yaml profile definition (highest priority)
2. Custom profile file path in .cora.yaml
3. Profile extends + overrides (merge with base)
4. Built-in profile name in .cora.yaml
5. Auto-detect from language + project (fallback)
Auto-Detection
If no profile is specified, Cora auto-detects based on project language:
Detected Language
Default Profile
Rust
rust-strict
TypeScript/JavaScript
typescript-strict
Go
go-pragmatic
Python
clean-code
Unknown/Mixed
clean-code
Profile Effect on AI Prompt
The profile directly modifies the review prompt sent to the LLM:
Without profile: "Review this diff for bugs, security issues, and code quality."
With profile: "Review this diff using the 'security-first' profile:
- CRITICAL focus: security, injection prevention (weight: 10)
- HIGH focus: error handling (weight: 7)
- IGNORE: style, naming, documentation
- Tone: strict, detail_level: high
- Always suggest fixes
- Block on any security finding"
This makes the AI review targeted and consistent rather than generic.
Summary
Add Quality Profiles — preset and configurable rule sets that define what Cora focuses on during review. Different projects need different review strictness: a security-critical API needs stricter review than a prototype experiment.
Motivation
.cora.yamlfrom scratch.cora.yaml. Presets give them a starting pointProposed Design
Built-in Profiles
Profile Definition Format
Each profile is a YAML file that defines focus areas, weights, and review behavior:
.cora.yamlUsageCLI Commands
Profile Resolution Order
Auto-Detection
If no profile is specified, Cora auto-detects based on project language:
rust-stricttypescript-strictgo-pragmaticclean-codeclean-codeProfile Effect on AI Prompt
The profile directly modifies the review prompt sent to the LLM:
This makes the AI review targeted and consistent rather than generic.
Architecture
Implementation Checklist
ProfileandFocusAreastructs insrc/engine/profiles.rs.cora.yaml(inline, path, extends)src/commands/profile.rswithlist,show,validate,initsubcommandscora profile initinteractive wizardcora profile previewdry-run modeinclude_str!)Out of Scope (Future)
Dependencies
cora.list_rulesexposes profile rules to AI agents