ralph-workflow 0.7.18

PROMPT-driven multi-agent orchestrator for git repos
Documentation
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Commit Message XSD Schema
  
  Allows <code> elements within text content for escaping special characters
  like <, >, and & (e.g., comparisons, generics, logical operators).
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  
  <!-- Text with optional inline code elements -->
  <xs:complexType name="TextWithCodeType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="code" type="xs:string"/>
    </xs:choice>
  </xs:complexType>
  
  <!-- File list type: holds individual file paths the agent wants to commit -->
  <xs:complexType name="FileListType">
    <xs:sequence>
      <xs:element name="ralph-file" type="TextWithCodeType" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <!-- Allowed reason values for excluded files -->
  <xs:simpleType name="ExcludedFileReasonType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="internal-ignore"/>
      <xs:enumeration value="not-task-related"/>
      <xs:enumeration value="sensitive"/>
      <xs:enumeration value="deferred"/>
    </xs:restriction>
  </xs:simpleType>

  <!-- Single excluded file entry: repo-relative path + required reason -->
  <xs:complexType name="ExcludedFileEntryType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="reason" type="ExcludedFileReasonType" use="required"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <!-- Excluded file list: at least one entry required when element is present -->
  <xs:complexType name="ExcludedFileListType">
    <xs:sequence>
      <xs:element name="ralph-excluded-file" type="ExcludedFileEntryType"
                  minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="ralph-commit">
    <xs:complexType>
      <xs:choice>
        <!-- Normal commit message -->
        <xs:sequence>
           <xs:element name="ralph-subject" type="TextWithCodeType"/>
           <!--
             Allow file/excluded metadata and body tags in either sibling order.
             The Rust validator accepts these tags regardless of order; the published XSD
             should be similarly permissive to reduce unnecessary XSD-retry churn.
           -->
           <xs:choice minOccurs="0">
             <!-- Body block before file metadata -->
             <xs:sequence>
               <!-- Body is mutually exclusive: either simple <ralph-body> OR detailed tags. -->
               <xs:choice minOccurs="0">
                 <xs:element name="ralph-body" type="TextWithCodeType"/>
                 <xs:sequence>
                   <!-- Detailed body tags: order-insensitive (duplicates rejected by Rust validator). -->
                   <xs:choice minOccurs="0" maxOccurs="3">
                     <xs:element name="ralph-body-summary" type="TextWithCodeType"/>
                     <xs:element name="ralph-body-details" type="TextWithCodeType"/>
                     <xs:element name="ralph-body-footer" type="TextWithCodeType"/>
                   </xs:choice>
                 </xs:sequence>
               </xs:choice>
               <!-- Optional file list / excluded metadata in either order -->
               <xs:choice minOccurs="0" maxOccurs="2">
                 <xs:element name="ralph-files" type="FileListType"/>
                 <xs:element name="ralph-excluded-files" type="ExcludedFileListType"/>
               </xs:choice>
             </xs:sequence>
             <!-- File metadata before body block -->
             <xs:sequence>
               <xs:choice minOccurs="0" maxOccurs="2">
                 <xs:element name="ralph-files" type="FileListType"/>
                 <xs:element name="ralph-excluded-files" type="ExcludedFileListType"/>
               </xs:choice>
               <xs:choice minOccurs="0">
                 <xs:element name="ralph-body" type="TextWithCodeType"/>
                 <xs:sequence>
                   <xs:choice minOccurs="0" maxOccurs="3">
                     <xs:element name="ralph-body-summary" type="TextWithCodeType"/>
                     <xs:element name="ralph-body-details" type="TextWithCodeType"/>
                     <xs:element name="ralph-body-footer" type="TextWithCodeType"/>
                   </xs:choice>
                 </xs:sequence>
               </xs:choice>
             </xs:sequence>
           </xs:choice>
        </xs:sequence>
        <!-- Skip commit (no changes found) -->
        <xs:element name="ralph-skip" type="TextWithCodeType"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>