/** * Code-commit-ban enforcer — PreToolUse Bash guard. * * Per L2 redesign §5.4. Deny `git commit` or `git apply` invocations from * a peaks-* skill. The Code Commit Ban Red Line says peaks-code / peaks-rd * are orchestrators, not implementers; the actual `git commit` step must * go through `peaks request transition`, which itself enforces spec-locked * + tech-doc-presence. * * Trust red line (per `gate-enforcement-hook.md`): if the registry or * manifest read fails, the hook must fail-OPEN (warn + allow). The LLM is * never bricked by a peaks bug. */ export interface CodeBanInput { /** The resolved driving skill, or `null` when no skill could be resolved. */ readonly skill: string | null; readonly command: string; /** Whether a `peaks-*` lease exists in this peaks session. */ readonly peaksLeasePresent: boolean; /** * Whether the caller's identity was resolved. When `true`, `skill === null` * means "this caller resolved and has no peaks skill" — which is an allow. * When `false`, we could not tell who is driving at all. */ readonly identityResolved: boolean; } export interface CodeBanResult { readonly denied: boolean; readonly reason: string; } export declare function isCodeCommit(skill: string | null, command: string): boolean; export declare function evaluateCodeBan(input: CodeBanInput): CodeBanResult;