oct.git.oct_git module#
Purpose#
Click command definitions for the oct git command group (Phase 4B).
Contains only CLI glue — argument parsing, JSON rendering, exit-code
translation. All computational work is delegated to
oct.git.quality_gate, oct.git.policy, and
oct.core.git.
Responsibilities#
Define the
gitClick group mounted under the top-levelcli.Implement
oct git statuswith--jsonand--no-checkflags.Implement
oct git checkwith--staged-only,--all,--include-tests,--fix,--profile,--jsonflags.Render human-readable terminal output and machine-readable JSON.
Populate
ctx.obj["_audit_record"]for the@auditeddecorator.
Diagnostics#
Domain: GIT Levels:
L2 — lifecycle: command start/end L3 — details: scope/profile resolution L4 — deep trace: per-file rendering decisions
Contracts#
Each command is wrapped with
@auditedfromoct.git.audit.Exit codes for
oct git checkfollow blueprint §5.3: 0=pass, 1=lint, 2=format, 3=lint+format, 4=tests, 5=secrets.oct git statusalways exits 0 (informational only).
Dependencies#
oct.core.diagnostics (_dbg structured logger)
oct.core.paths (project-relative path helper)
oct.core.project_root (project root detection)
oct.git.audit (AuditRecord, audited decorator)
click (CLI framework)