{
  "log_version": "1.0",
  "description": "Template for validation override logging",
  "log_entry_schema": {
    "log_id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for this log entry"
    },
    "timestamp": {
      "type": "string",
      "format": "iso8601",
      "description": "When the override occurred"
    },
    "story": {
      "story_id": {
        "type": "string",
        "description": "Story identifier (e.g., 'PROJ-123' or '1.1')"
      },
      "story_title": {
        "type": "string",
        "description": "Human-readable story title"
      },
      "story_type": {
        "type": "string",
        "enum": ["feature", "bug", "spike", "research", "tech-debt"],
        "description": "Type of story being validated"
      },
      "story_points": {
        "type": "number",
        "description": "Story complexity estimate"
      }
    },
    "user": {
      "user_id": {
        "type": "string",
        "description": "ID of user who overrode"
      },
      "user_name": {
        "type": "string",
        "description": "Display name of user"
      },
      "team_id": {
        "type": "string",
        "description": "Team identifier"
      },
      "team_name": {
        "type": "string",
        "description": "Team display name"
      }
    },
    "validation": {
      "rules_overridden": {
        "type": "array",
        "items": {
          "rule_id": {
            "type": "string",
            "description": "ID of the overridden rule"
          },
          "rule_description": {
            "type": "string",
            "description": "What the rule checks"
          },
          "severity": {
            "type": "string",
            "enum": ["warning"],
            "description": "Original severity (only warnings can be overridden)"
          }
        }
      },
      "total_warnings": {
        "type": "number",
        "description": "Total number of warnings for this story"
      },
      "warnings_overridden": {
        "type": "number",
        "description": "Number of warnings overridden"
      }
    },
    "justification": {
      "text": {
        "type": "string",
        "description": "User-provided justification for override"
      },
      "category": {
        "type": "string",
        "enum": [
          "discussed_in_planning",
          "will_add_during_implementation",
          "not_applicable_to_type",
          "external_documentation",
          "alternative_process",
          "other"
        ],
        "description": "Categorized justification type"
      }
    },
    "context": {
      "sprint_id": {
        "type": "string",
        "description": "Current sprint identifier"
      },
      "parallel_stories_count": {
        "type": "number",
        "description": "Number of stories being developed in parallel"
      },
      "validation_duration_ms": {
        "type": "number",
        "description": "How long validation took"
      }
    },
    "outcome": {
      "status": {
        "type": "string",
        "enum": ["pending", "success", "minor_issues", "major_issues"],
        "description": "Eventual outcome of the story (updated later)"
      },
      "issues_encountered": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Specific issues that occurred"
      },
      "notes": {
        "type": "string",
        "description": "Additional outcome notes"
      }
    }
  },
  "example_entry": {
    "log_id": "a4f7d3e1-8b2c-4d5e-9f6a-1b3c4d5e6f7a",
    "timestamp": "2024-01-15T14:30:00Z",
    "story": {
      "story_id": "PROJ-123",
      "story_title": "Add user authentication to API",
      "story_type": "feature",
      "story_points": 8
    },
    "user": {
      "user_id": "dev123",
      "user_name": "Jane Developer",
      "team_id": "team-alpha",
      "team_name": "Team Alpha"
    },
    "validation": {
      "rules_overridden": [
        {
          "rule_id": "NO_DEV_NOTES",
          "rule_description": "Story should have detailed dev notes",
          "severity": "warning"
        }
      ],
      "total_warnings": 2,
      "warnings_overridden": 1
    },
    "justification": {
      "text": "We discussed the implementation approach in detail during sprint planning. All devs are aligned on using JWT tokens with refresh rotation.",
      "category": "discussed_in_planning"
    },
    "context": {
      "sprint_id": "sprint-2024-01",
      "parallel_stories_count": 4,
      "validation_duration_ms": 523
    },
    "outcome": {
      "status": "success",
      "issues_encountered": [],
      "notes": "Completed without conflicts"
    }
  },
  "usage_notes": [
    "Logs should be appended to .bmad/parallel-dev/validation-overrides.log",
    "Outcome status should be updated after story completion",
    "Category field helps with pattern analysis",
    "All fields except outcome are required at override time"
  ]
}