Complete rules with "changes" or "exists" for some jobs

I’m using anchors for script in order to re-use rules on several jobs:

.S1: &S1
    - if: '$SCENARIO == "S1"'

.S2: &S2
    - if: '$SCENARIO == "S2"'

.S3: &S3
    - if: '$SCENARIO == "S3"'

job A:
  rules:
    - *S1
    - *S2
  script:
    - echo "job A"

job B:
  rules:
    - *S1
    - *S3
  script:
    - echo "job B"

And it works like a charm.

Now I would like to complete some of this rules with ‘changes’ or ‘exists’.
For instance:

.S1: &S1
    - if: '$SCENARIO == "S1"'

.S2: &S2
    - if: '$SCENARIO == "S2"'

.S3: &S3
    - if: '$SCENARIO == "S3"'

job A:
  rules:
    - *S1
      exists:
          - README.md
    - *S2
  script:
    - echo "job A"

job B:
  rules:
    - *S1
    - *S3
       changes:
           - Dockerfile
  script:
    - echo "job B"

But this doesn’t work.

What can I do to going through this?