audit-first-commentary

Document non-trivial code with invariants, failure modes, and design tradeoffs.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/dylanmarriner/windsurf-hooker --skill audit-first-commentary
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: audit-first-commentary
Source: https://github.com/dylanmarriner/windsurf-hooker/tree/main/windsurf/skills/audit-first-commentary
Command: npx skills add https://github.com/dylanmarriner/windsurf-hooker --skill audit-first-commentary

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Documenting non-trivial code with explicit invariants, failure modes, and design tradeoffs to improve readability, maintenance, and auditability.

Core Features & Use Cases

  • Invariants & Failure Modes: Each file includes a concise summary of invariants and potential failure modes.
  • Tradeoff Rationale: Document decisions including alternatives, risks, and mitigations.
  • Use Case: Refactor a complex module by capturing design decisions to aid future contributors.

Quick Start

Add a concise file-level documentation block at the top of a non-trivial file describing its purpose, invariants, and failure modes.

Frequently Asked Questions about audit-first-commentary

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to document code invariants and design tradeoffs?▼

Documenting code invariants and design tradeoffs involves adding concise file-level blocks that summarize purpose, failure modes, and alternatives considered. This practice improves readability, maintenance, and auditability for non-trivial modules.

How do I document failure modes when refactoring complex logic?▼

To document failure modes during complex logic refactoring, add a concise summary of potential failure scenarios directly within the file-level documentation block at the top of the non-trivial file.

When do I need to document design tradeoffs in my codebase?▼

You need to document design tradeoffs when writing new modules, refactoring complex logic, updating CI/scripts, or modifying configuration to ensure consistent documentation and capture decisions for future contributors.

How do I enforce consistent inline comments and file headers across a project?▼

You can enforce consistent inline comments and file headers by applying a standard file header structure alongside a lightweight review process, ensuring all non-trivial files document invariants and tradeoffs consistently.

Does this documentation approach work for CI scripts and configuration files?▼

Yes, this documentation approach explicitly applies to updating CI/scripts and modifying configuration, requiring file- and function-level comments to capture invariants, failure modes, and design tradeoffs in these non-trivial files.