Codebase Audit Prompt

assetactive

Master Codebase Audit Prompt

A comprehensive master codebase audit prompt designed to ensure adherence to established standards, optimize structure, and enhance maintainability. Covers five key audit areas.

Prompt

Conduct a comprehensive master codebase audit to ensure adherence to established standards, optimize structure, and enhance maintainability. This audit must encompass the following key areas:

1. Documentation Structure and Content Optimization

Objective: Reduce clutter and consolidate documentation within the docs/{dirs} directory to include only essential folders and content.

Deliverables:

  • A detailed plan for documentation consolidation and clutter reduction.
  • Criteria defining "necessary folders" and content.
  • A revised docs/{dirs} structure implemented to reflect the optimized layout.
  • Verification that no critical information (rules, tenets, etc.) is lost during consolidation.

2. Naming Convention Enforcement

Objective: Establish and enforce consistent naming conventions across the entire codebase, including files, directories, variables, functions, and components.

Deliverables:

  • A comprehensive "naming convention matrix" detailing preferred conventions (e.g., kebab-case, camelCase, PascalCase) for different code elements and contexts.
  • An audit report identifying all instances of naming convention mismatches.
  • A remediation plan for addressing identified inconsistencies.

3. Governance Tooling and Policy Enforcement Integration

Objective: Ensure that all governance tools and code-by-policy enforcers are fully integrated and operational with the existing self-healing, self-learning, and notes-taking platform.

Deliverables:

  • Documentation outlining the integration points and workflows between governance tools and the platform.
  • Verification reports confirming that policy enforcement mechanisms are actively monitoring and reporting compliance.
  • A plan for continuous monitoring and improvement of governance tool effectiveness.

4. Codebase Layout and Simplicity

Objective: Achieve the simplest possible codebase layout and promote the simplest code writing practices without compromising functionality or losing critical architectural, design, or business rules.

Deliverables:

  • A proposed simplified codebase layout, adhering to principles of modularity, separation of concerns, and minimal complexity.
  • Guidelines for "simplest code writing" (e.g., DRY, KISS, YAGNI principles).
  • An assessment of current code complexity and a strategy for reduction.
  • Confirmation that all essential documentation content, rules, and tenets are preserved and easily accessible within the simplified structure.

5. Internal Tooling Alignment and Reflection

Objective: Ensure all internal tooling, including CLIs, internal control panels (MCPs), and npm packages, accurately reflect and support the diverse requirements of internal, external, business, open-source (OSS), and Software-as-a-Service (SaaS) contexts.

Deliverables:

  • An inventory of all internal tooling.
  • An analysis of how each tool aligns with the requirements of internal, external, business, OSS, and SaaS use cases.
  • A report identifying gaps or misalignments in tooling.
  • A roadmap for evolving or developing tooling to better serve all identified contexts, ensuring consistency, reusability, and appropriate licensing/distribution models.

Cross-Cutting Requirements

Throughout this audit, maintain a detailed log of all findings, decisions, and lessons learned to inform future development and maintenance efforts. The ultimate goal is to achieve a highly organized, maintainable, and policy-compliant codebase.


Provenance: Extracted from npp-backups/new 22@2026-03-12_114527 — Master codebase audit prompt authored 2026-03-12. Five-area audit covering documentation structure, naming conventions, governance tooling integration, codebase simplicity, and internal tooling alignment.