adjacency rule

adjacency.valid-context

Name a shared Formation family with its arity scope, and do not mix state and magnitude annotations in one construct.

  • product: error
  • marketing: error
  • public: warning
  • docs: warning

Rationale

No separate rationale is authored; the rule statement above is authoritative.

Guidance

No separate guidance is authored. The rule's authored examples and fix policies follow below.

Checker behavior

Message

Invalid adjacent Canon context: {captured}.

Applies in

  • heading
  • body
  • blockquote
  • list item
  • table cell
  • json key
  • glossary term
  • notation token

Detection

composition ids
  • compose.pattern
  • compose.single-formation
  • compose.dyad-formation
kind
adjacency

Authored examples and fix policies

subtypes
[
  {
    "examples": {
      "correct": [
        {
          "check_input": {
            "kind": "document"
          },
          "format": "text",
          "id": "scoped-shared-family",
          "profile": "general-prose",
          "surface": "docs",
          "text": "Single Formation family: Level"
        }
      ],
      "incorrect": [
        {
          "captured": "Formation family: Level",
          "check_input": {
            "kind": "document"
          },
          "format": "text",
          "id": "unscoped-shared-family",
          "outcome_id": "violation",
          "profile": "general-prose",
          "surface": "docs",
          "text": "Formation family: Level"
        }
      ]
    },
    "id": "formation-family-scope",
    "outcomes": [
      {
        "disposition": "structural",
        "fix": {
          "interactive": "retry",
          "unattended": "retry"
        },
        "id": "violation"
      }
    ],
    "supersedes": []
  },
  {
    "examples": {
      "correct": [
        {
          "check_input": {
            "expectation": {
              "attempt": {
                "axes": [
                  {
                    "axis": "axis.open",
                    "state": "over"
                  },
                  {
                    "axis": "axis.focus",
                    "state": "under"
                  }
                ],
                "composition_id": "compose.pattern"
              },
              "components": [
                {
                  "end": 4,
                  "role": "axes",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "state-only-annotation",
          "profile": "patterns",
          "surface": "docs",
          "text": "O+F-"
        }
      ],
      "incorrect": [
        {
          "captured": "O+F-2",
          "check_input": {
            "expectation": {
              "attempt": {
                "axes": [
                  {
                    "axis": "axis.open",
                    "state": "over"
                  },
                  {
                    "axis": "axis.focus",
                    "magnitude": -2
                  }
                ],
                "composition_id": "compose.pattern"
              },
              "components": [
                {
                  "end": 5,
                  "role": "axes",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "mixed-state-magnitude",
          "outcome_id": "violation",
          "profile": "patterns",
          "surface": "docs",
          "text": "O+F-2"
        }
      ]
    },
    "id": "annotation-mutual-exclusion",
    "outcomes": [
      {
        "disposition": "structural",
        "fix": {
          "interactive": "retry",
          "unattended": "retry"
        },
        "id": "violation"
      }
    ],
    "supersedes": [
      {
        "rule_id": "composition.pattern",
        "subtype_id": "annotation"
      }
    ]
  }
]