Morphism Codebase Audit Master Prompt
assetactive
Morphism Codebase Audit Master Prompt
Source: morphism-codebase-audit-master-prompt.md (ingested 2026-03-28)
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:
-
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.
- Objective: Reduce clutter and consolidate documentation within the
-
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.
-
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.
-
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.
-
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.
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.