{
  "id": "code-audit-blueprint-v1",
  "version": "1.0.0",
  "title": "Real Codebase Audit Blueprint",
  "category": "engineering-quality",
  "description": "Memory pack for consistent, high-signal code audits across repos and coding tools.",
  "outcome": "Reusable audit standards with strict fail thresholds and issue taxonomy.",
  "tags": [
    "audit",
    "code-quality",
    "security",
    "testing",
    "cli"
  ],
  "defaults": {
    "tone": "direct",
    "strictFailMode": true,
    "outputFormat": "checklist-with-evidence"
  },
  "memoryNodes": [
    {
      "category": "preference",
      "nodeType": "policy",
      "summary": "Code audit baseline: fail on silent catch blocks used as control flow.",
      "tags": ["audit", "exceptions", "reliability"],
      "mass": 1.3
    },
    {
      "category": "preference",
      "nodeType": "policy",
      "summary": "Fail audit on broad any types in core service boundaries.",
      "tags": ["audit", "typescript", "type-safety"],
      "mass": 1.2
    },
    {
      "category": "preference",
      "nodeType": "policy",
      "summary": "Critical paths require tests for success and error branches.",
      "tags": ["audit", "testing", "coverage"],
      "mass": 1.4
    },
    {
      "category": "workflow",
      "nodeType": "template",
      "summary": "Audit report sections: findings, severity, evidence, fix guidance, pass/fail score.",
      "tags": ["audit", "reporting", "checklist"],
      "mass": 1.1
    },
    {
      "category": "workflow",
      "nodeType": "policy",
      "summary": "Flag mixed async styles in same module when they obscure error handling.",
      "tags": ["audit", "async", "readability"],
      "mass": 1.0
    },
    {
      "category": "workflow",
      "nodeType": "policy",
      "summary": "Flag hidden side effects in utility functions and helper modules.",
      "tags": ["audit", "side-effects", "maintainability"],
      "mass": 1.0
    }
  ],
  "scoringModel": {
    "checksTotal": 12,
    "severityWeights": {
      "critical": 1.0,
      "high": 0.75,
      "medium": 0.5,
      "low": 0.25
    },
    "failIf": {
      "criticalFindings": ">=1",
      "highFindings": ">=2"
    }
  },
  "installInstructions": {
    "summary": "Import into Empirical to seed audit memories used by ChatGPT and local coding CLI sessions.",
    "steps": [
      "Open Blueprint Store and search for code audit blueprint.",
      "Install blueprint to workspace.",
      "Run a code audit prompt; Empirical will recall these standards automatically."
    ]
  }
}
