Skip to content

Latest commit

 

History

History
111 lines (85 loc) · 4.02 KB

File metadata and controls

111 lines (85 loc) · 4.02 KB

Agent Context — cora-cli

Pre-Release Checklist

Before creating any release PR, verify ALL of the following are updated:

Code

  • Cargo.toml — version bump
  • All target issues merged to develop
  • cargo test — all 567+ tests pass
  • cargo clippy --all-targets -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • cargo build --release — no errors
  • Binary smoke test: cora --version, cora mcp --help, cora review --staged

Documentation

  • README.md — feature list, commands table, config examples, all links to codecora.dev
  • CHANGELOG.md — new version entry with ALL changes
  • docs/changelog.md — mirrors CHANGELOG.md exactly
  • docs/roadmap.md — completed items ✓ Done, future items accurate
  • docs/getting-started.md — new major features mentioned, links valid
  • docs/configuration.md — all new config sections present
  • docs/cli-reference.md — all commands listed including new subcommands
  • docs/usage.md — exit codes, sections up to date
  • docs/examples.md — CI examples work, marketplace action reference correct
  • docs/providers.md — provider list and env vars accurate
  • docs/installation.md — version pin example uses latest
  • AGENT.md — code structure, test count, features list current

Cross-Check

  • Feature coverage: every feature in README + CHANGELOG + config docs + roadmap
  • Consistent terminology across all files
  • No broken links (all codecora.dev links resolve)
  • Version numbers consistent across all docs
  • Star History chart includes all relevant repos

CI & Scanning

  • CI: 10/10 checks green on develop
  • Code Scanning: 0 open alerts
  • No open PRs blocking release
  • Pre-commit hook passes (cora review --staged)

Post-Release

  • release.yml triggers on v* tag
  • 4 platform binaries on GitHub Releases
  • crates.io publish succeeds
  • codecora.dev reflects new docs
  • Marketplace action still works

Release Authority

Owner approval required before ANY release. Agent must:

  1. Complete Pre-Release Checklist (all green)
  2. Generate validation report
  3. Present to owner
  4. Wait for explicit approval ("oke kerjakan" / "go ahead" / "rilis")
  5. Only then: bump version + tag + push

Agent must NEVER trigger release without owner approval.

Branch Conventions

  • All PRs target develop (not main)
  • Feature branches: feat/<issue-number>-<description>
  • Fix branches: fix/<description>
  • Release branches: release/vX.Y.Z
  • Pre-commit hook must pass before each commit
  • One issue = one branch = one PR = wait CI green = merge = next

Config Architecture (v0.5.0+)

File Contents
~/.cora/auth.toml API key only (secret, chmod 600)
~/.cora/config.yaml Provider, model, base_url, settings (global)
.cora.yaml Per-project overrides

Key Decisions

  • License: MIT (Rust CLI ecosystem standard)
  • CORA_API_KEY env var: CI use only, not for local dev
  • Provider info auto-migrated from auth.toml → config.yaml
  • Config priority: CLI flags → env vars → .cora.yaml → config.yaml → auto-detect → defaults
  • Marketplace action: separate repo codecoradev/cora-review-action (not in-tree)
  • Quality gate: exit code 2 on failure (1 = error, 0 = success)
  • merge_into() returns Result<(), CoraError> — fail-fast on invalid profile config
  • MCP server: JSON-RPC 2.0 over stdio, 5 tools

CI Required Checks (10)

Check, Format, Clippy, Test, Build, Security Audit (CVE), Website Build, NPM Audit, Cargo Outdated, Cora Review

Module Dependencies

config/ → engine/ → formatters/
         ↗               ↘
main.rs → commands/ → output
         ↘               ↗
    git/ → engine/review
    mcp/  → engine/* (rules, security_scanner, secrets_scanner, profiles, diff_parser)
    hook/

Key: engine modules should NOT depend on commands or config/loader directly. mcp/tools uses engine internals via crate::engine::*.