# Rule Inventory (Pass A)

Audit scope: every `.md` under `.gzkit/rules/`, plus top-level `AGENTS.md` and
`CLAUDE.md`. Vendor mirrors (`.claude/rules/`, `.github/instructions/`) are
derivative and out of scope.

Total files in scope: **21**. Line-counts recorded via `wc -l` against the
canonical paths; section headings extracted via direct Read of each file.

---

## `.gzkit/rules/adr-audit.md` (47)

- § Audit sequence
- § Rules

## `.gzkit/rules/AGENTS.md` (65)

> Note: this is an auto-generated cross-surface index (`Generated by gzkit —
> do not edit manually`) that embeds `.gzkit/rules/skill-surface-sync.md`
> content under a new H1. It is out-of-band from the canonical rule files.

- § Non-negotiable rules
- § Surface layout
- § Procedure
- § Version discipline
- § Conflict resolution
- § Anti-patterns
- § Rationale

## `.gzkit/rules/arb.md` (106)

- § Core Concept
- § When to Use ARB
- § Available Commands
  - § Wrap a QA Tool (Generic)
  - § Validate and Analyze Receipts
  - § Extract Recurring Anti-Patterns
- § Receipt Schema and Storage
- § Exit Codes

## `.gzkit/rules/attestation-enrichment.md` (91)

- § Pattern (binding)
- § Canonical invocations (binding)
- § Applies to
- § Lane behavior
- § Enrichment content
- § Anti-patterns
- § Example
- § Rationale
  - § Why receipts, not narrative
  - § Why canonical commands
  - § TDD RED evidence is not ARB-shaped (GHI #157)

## `.gzkit/rules/behavioral-invariants.md` (108)

- § Ownership
  - § Scope boundary for Invariants 2 and 4
- § Craftsmanship — DO IT RIGHT
  - § Rationale for Invariants 6g and 6h
- § Process
- § Judgment
- § Efficiency
- § Attribution

## `.gzkit/rules/brief-heading-conventions.md` (52)

- § Canonical evidence sections (H3)
- § Why H3, not H2
- § Mechanical check
- § Related

## `.gzkit/rules/chores.md` (66)

- § Core Principles
- § Command Sequences
  - § 1. Discover Chores
  - § 2. Plan & Advise
  - § 3. Apply Advice
- § Evidence & Attestation
  - § Correct Evidence (CLI commands only)
  - § Prohibited Evidence

## `.gzkit/rules/cli.md` (89)

- § Core Principles
- § Exit Codes (Standard 4-Code Map)
- § Flag Conventions
- § Output Contracts
- § Help Text Requirements
- § Adding CLI Features
  - § New Flag (Additive = Lite Lane)
  - § New Subcommand (Heavy Lane)

## `.gzkit/rules/constraints.md` (131)

- § TDD Discipline
- § Data Models
- § Surface Sync
- § Documentation Covenant
- § Pipeline Lifecycle
- § OBPI Completion
- § ADR Closeout
- § ADR Creation
- § State Doctrine
- § Storage Tiers
- § Architectural Boundaries

## `.gzkit/rules/cross-platform.md` (113)

- § Quick Reference
- § File Paths (Always pathlib.Path)
- § Encoding (Always UTF-8)
- § Temporary Files (Context Managers)
- § Subprocess (List Form)
- § Console Output (Rich / Unicode)
  - § Scope boundary of the runtime guard (binding)
  - § Windows-safe helper patterns
- § Code Review Checklist

## `.gzkit/rules/defect-fix-routing.md` (81)

- § Direct fix is the right route when ALL hold
- § OBPI ceremony is required when ANY hold
- § Decision protocol
- § Anti-patterns
- § When this rule was authored
- § Related

## `.gzkit/rules/gate5-runbook-code-covenant.md` (39)

- § Three-layer documentation model
- § Required updates when behavior changes
- § Validation bundle
- § Anti-patterns

## `.gzkit/rules/gh-cli.md` (40)

- § Allowed commands
- § Prohibited without explicit approval
- § Defect tracking requirement

## `.gzkit/rules/governance-core.md` (38)

- § Non-negotiable rules
- § Required workflow order (OBPI implementation path)
- § Proof commands

## `.gzkit/rules/models.md` (46)

- § Why Pydantic Over Dataclasses
- § Pattern: Immutable Domain Model
- § Anti-Patterns (DO NOT USE)
- § Verify

## `.gzkit/rules/pythonic.md` (62)

- § Core Principles
- § Size Limits & Refactoring
- § Imports (PEP 8)
- § Error Handling
- § Toolchain (Astral)
- § Type-check suppression syntax (ty — binding)

## `.gzkit/rules/skill-surface-sync.md` (71)

- § Non-negotiable rules
- § Surface layout
- § Procedure
- § Version discipline
- § Conflict resolution
- § Anti-patterns
- § Rationale

## `.gzkit/rules/tests.md` (168)

- § General Rules (binding)
- § Coverage Floor (binding)
- § Run / Verify
- § Red-Green-Refactor (TDD Discipline — binding)
  - § TDD anti-patterns
  - § RED evidence
- § TASK-Driven Workflow (binding — GHI #160 Phase 6)
  - § TASK anti-patterns
- § Two runners, one test surface
  - § Unit-tier contract (binding)
  - § End-to-end coverage lives in behave
  - § Behave scenario tagging (GHI #185)
  - § Runner anti-patterns
- § Patterns
  - § Temp-dir context manager (preferred)
- § Rationale
  - § Canonical history of the two-runner boundary
  - § Why TDD rhythm matters

## `.gzkit/rules/tool-skill-runbook-alignment.md` (110)

- § Invariants
  - § Invariant 1 — Every CLI tool has at least one skill that wields it
  - § Invariant 2 — Every skill's `gz_command` matches a runbook-prescribed tool for the same operator moment
  - § Invariant 3 — Destination verb's default output form must honor the routing skill's Output Contract
- § Rationale
- § Enforcement
- § When to apply
- § Anti-patterns
- § Commit-message discipline for skill-routing changes
- § Related

## `AGENTS.md` (332, top-level)

- § Project Identity
- § Why this contract is not minimal
- § Persona
- § Prime Directive (Ownership)
- § DO IT RIGHT (Craftsmanship Maxim)
  - § The anti-pattern canon (what vibe coding looks like)
  - § TASK-driven workflow (binding)
- § Behavior Rules
  - § Always
  - § Never
- § Pattern Discovery
  - § Workflow
- § Skills
  - § Canonical + Mirror Paths
  - § Skills Protocol
  - § Available Skills
- § Gate Covenant
  - § Lane Rules
  - § Kinds (pool, foundation, feature)
  - § OBPI Decomposition Mandate
- § OBPI Acceptance Protocol
  - § Lane Inheritance Rule
- § Execution Rules
- § Control Surfaces
- § Local Agent Rules (from agents.local.md)
- § Governance doctrine surfaces
- § Architectural Boundaries

## `CLAUDE.md` (47, top-level)

- § (transclusion of AGENTS.md via `@AGENTS.md`)
- § Claude Code addendum
- § Compact Instructions
