lint

Overview

Runs the external codex CLI against repository files using the ontology as policy input. In report mode it emits ontology-aligned violations; with --fix it asks Codex to apply lightweight code changes and prints a structured summary.

Usage

ouro lint [--fix] [--codex-model <model>] [--include <globs>] [--exclude <globs>]

Key Options

  • --fix – Allow Codex to rewrite files and print a change summary.
  • --codex-model <model> – Override the Codex model used for linting or fixing (default gpt-5).
  • --include <globs> – Comma-separated glob filters that restrict the scanned files.
  • --exclude <globs> – Globs to skip.

Inputs & Outputs

  • Inputs: .ouro/ontology/main.md (or .ouro/ontology.md) and the selected set of source files.
  • Outputs: JSON-formatted violation list (non-fix mode) or change summary plus remaining issues (fix mode), all streamed directly to stdout. File edits happen in-place when --fix is provided.

When to Use

  • Enforce custom architecture or layering rules described in the ontology.
  • Apply ontology-aligned mechanical fixes before a pull request.

Follow-up Checklist

  • Review git diff carefully when --fix is used.
  • Re-run ouro lint without --fix to confirm no violations remain.