--- 
rules:

  capability-info-negative:
    description: Does not have info
    message: You MUST provide info
    tags:
      - Documentation
      - Discovery
    severity: error
    given: $
    then:
      field: info
      function: truthy

  capability-info-positive:
    description: Has info
    message: Has info
    tags:
      - Documentation
      - Discovery
    severity: info
    given: $
    then:
      field: info
      function: falsy   


  capability-info-description-negative:
    description: Does not have info description
    message: You MUST provide info description
    tags:
      - Documentation
      - Discovery
    severity: error
    given: $.info
    then:
      field: description
      function: truthy

  capability-info-description-positive:
    description: Has info description
    message: Has info description
    tags:
      - Documentation
      - Discovery
    severity: info
    given: $.info
    then:
      field: description
      function: falsy         

  capability-info-icon-hint:
    description: Could have icon
    message: You could add an icon
    tags:
      - Documentation
      - Discovery
    severity: hint
    given: $.info
    then:
      field: description
      function: truthy

  capability-info-icon-positive:
    description: Have an icon
    message: Has an Icon
    tags:
      - Documentation
      - Discovery
    severity: info
    given: $.info
    then:
      field: description
      function: falsy                

  capability-info-tags-negative:
    description: Does not have info tags
    message: You MUST provide info tags
    tags:
      - Documentation
      - Discovery
    severity: error
    given: $.info
    then:
      field: tags
      function: truthy

  capability-info-tags-positive:
    description: Has info tags
    message: Has info tags
    tags:
      - Documentation
      - Discovery
    severity: info
    given: $.info
    then:
      field: tags
      function: falsy   

  capability-info-tags-one-error:
    description: Have one tag
    message: MUST have one tag
    given: $.info
    severity: error
    tags:
      - Documentation
      - Discovery    
    then:
      field: tags
      function: length
      functionOptions:
        min: 1      

  capability-info-pin-hint:
    description: Could have pinned
    message: You could pin capability
    tags:
      - Documentation
      - Discovery
    severity: hint
    given: $.info
    then:
      field: pinned
      function: truthy

  capability-info-pin-positive:
    description: Have pinned
    message: Capability is pinned
    tags:
      - Documentation
      - Discovery
    severity: info
    given: $.info
    then:
      field: pinned
      function: falsy  

  capability-info-featured-hint:
    description: Could have featured
    message: You could featured capability
    tags:
      - Documentation
      - Discovery
    severity: hint
    given: $.info
    then:
      field: featured
      function: truthy

  capability-info-featured-positive:
    description: Have an featured
    message: Capability is featured
    tags:
      - Documentation
      - Discovery
    severity: info
    given: $.info
    then:
      field: featured
      function: falsy                

  capability-license-negative:
    description: Does not have license
    message: You MUST provide license
    tags:
      - Legal
      - Licensing
    severity: error
    given: $
    then:
      field: license
      function: truthy

  capability-license-positive:
    description: Has license
    message: Has license
    tags:
      - Legal
      - Licensing
    severity: info
    given: $
    then:
      field: license
      function: falsy   

  capability-license-license-negative:
    description: Does not have license source
    message: You MUST provide license source
    tags:
      - Legal
      - Licensing
    severity: error
    given: $.license
    then:
      field: license
      function: truthy

  capability-license-license-positive:
    description: Has license source
    message: Has license source
    tags:
      - Legal
      - Licensing
    severity: info
    given: $,license
    then:
      field: license
      function: falsy    

  capability-license-attribution-negative:
    description: Does not have license attribution
    message: You MUST provide license attribution
    tags:
      - Legal
      - Licensing
    severity: error
    given: $.license
    then:
      field: attribution
      function: truthy

  capability-license-attribution-positive:
    description: Has license attribution
    message: Has license attribution
    tags:
      - Legal
      - Licensing
    severity: info
    given: $,license
    then:
      field: attribution
      function: falsy   

  capability-license-url-negative:
    description: Does not have license url
    message: You MUST provide license url
    tags:
      - Legal
      - Licensing
    severity: error
    given: $.license
    then:
      field: url
      function: truthy

  capability-license-url-positive:
    description: Has license url
    message: Has license url
    tags:
      - Legal
      - Licensing
    severity: info
    given: $.license
    then:
      field: url
      function: falsy   

  capability-metrics-negative:
    description: Does not have metrics
    message: You MUST provide metrics
    tags:
      - Activity
      - Metrics
    severity: error
    given: $
    then:
      field: metrics
      function: truthy

  capability-metrics-positive:
    description: Has metrics
    message: Has license url
    tags:
      - Activity
      - Metrics
    severity: info
    given: $
    then:
      field: url
      function: falsy                         

  capability-metrics-weavingScore-negative:
    description: Does not have metrics weavingScore
    message: You MUST provide metrics weavingScore
    tags:
      - Activity
      - Metrics
    severity: error
    given: $.metrics
    then:
      field: weavingScore
      function: truthy

  capability-metrics-weavingScore-positive:
    description: Has metrics weavingScore
    message: Has metrics weavingScore
    tags:
      - Activity
      - Metrics
    severity: info
    given: $.metrics
    then:
      field: weavingScore
      function: falsy   

  capability-metrics-maturityScore-negative:
    description: Does not have metrics maturityScore
    message: You MUST provide metrics maturityScore
    tags:
      - Activity
      - Metrics
    severity: error
    given: $.metrics
    then:
      field: maturityScore
      function: truthy

  capability-metrics-maturityScore-positive:
    description: Has metrics maturityScore
    message: Has metrics maturityScore
    tags:
      - Activity
      - Metrics
    severity: info
    given: $.metrics
    then:
      field: maturityScore
      function: falsy   

  capability-metrics-rating-negative:
    description: Does not have metrics rating
    message: You MUST provide metrics rating
    tags:
      - Activity
      - Metrics
    severity: error
    given: $.metrics
    then:
      field: rating
      function: truthy

  capability-metrics-rating-positive:
    description: Has metrics rating
    message: Has metrics rating
    tags:
      - Activity
      - Metrics
    severity: info
    given: $.metrics
    then:
      field: rating
      function: falsy   
      
  capability-change-negative:
    description: Does not have change
    message: You MUST provide change
    tags:
      - Activity
      - Change
    severity: error
    given: $
    then:
      field: change
      function: truthy

  capability-change-positive:
    description: Has change
    message: Has license url
    tags:
      - Activity
      - Change
    severity: info
    given: $
    then:
      field: url
      function: falsy                         

  capability-change-updated-negative:
    description: Does not have change updated
    message: You MUST provide change updated
    tags:
      - Activity
      - Change
    severity: error
    given: $.change
    then:
      field: updated
      function: truthy

  capability-change-updated-positive:
    description: Has chabge updated
    message: Has change updated
    tags:
      - Activity
      - Change
    severity: info
    given: $.change
    then:
      field: updated
      function: falsy             

  capability-change-created-negative:
    description: Does not have change created
    message: You MUST provide change created
    tags:
      - Activity
      - Change
    severity: error
    given: $.change
    then:
      field: created
      function: truthy

  capability-change-created-positive:
    description: Has updated created
    message: Has change created
    tags:
      - Activity
      - Change
    severity: info
    given: $.change
    then:
      field: created
      function: falsy  