composition rule

composition.interaction

Use a declared interaction type with admitted operand kinds and directionality.

  • 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

{captured} is not a valid Canon composition.

Applies in

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

Detection

detector
composition.interaction
kind
delegated

Authored examples and fix policies

subtypes
[
  {
    "examples": {
      "correct": [
        {
          "check_input": {
            "expectation": {
              "attempt": {
                "composition_id": "compose.interaction",
                "member_id": "interaction.directional-cross-compensation/compensation.anguishing/compensation.intellectualizing",
                "operand_a": "compensation.anguishing",
                "operand_b": "compensation.intellectualizing",
                "type": "interaction.directional-cross-compensation"
              },
              "components": [
                {
                  "end": 17,
                  "role": "type",
                  "start": 0
                },
                {
                  "end": 17,
                  "role": "operand_a",
                  "start": 0
                },
                {
                  "end": 17,
                  "role": "operand_b",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "interaction-type-known",
          "profile": "general-prose",
          "surface": "docs",
          "text": "typed interaction"
        }
      ],
      "incorrect": [
        {
          "captured": "typed unknown interaction",
          "check_input": {
            "expectation": {
              "attempt": {
                "composition_id": "compose.interaction",
                "member_id": null,
                "operand_a": "trap.emotional-blanking",
                "operand_b": "trap.emotional-detaching",
                "type": "interaction.not-declared"
              },
              "components": [
                {
                  "end": 25,
                  "role": "type",
                  "start": 0
                },
                {
                  "end": 25,
                  "role": "operand_a",
                  "start": 0
                },
                {
                  "end": 25,
                  "role": "operand_b",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "interaction-type-unknown",
          "outcome_id": "violation",
          "profile": "general-prose",
          "surface": "docs",
          "text": "typed unknown interaction"
        }
      ]
    },
    "id": "interaction-type",
    "outcomes": [
      {
        "disposition": "structural",
        "fix": {
          "interactive": "retry",
          "unattended": "retry"
        },
        "id": "violation"
      }
    ],
    "supersedes": []
  },
  {
    "examples": {
      "correct": [
        {
          "check_input": {
            "expectation": {
              "attempt": {
                "composition_id": "compose.interaction",
                "member_id": "interaction.directional-cross-compensation/compensation.anguishing/compensation.intellectualizing",
                "operand_a": "compensation.anguishing",
                "operand_b": "compensation.intellectualizing",
                "type": "interaction.directional-cross-compensation"
              },
              "components": [
                {
                  "end": 26,
                  "role": "type",
                  "start": 0
                },
                {
                  "end": 26,
                  "role": "operand_a",
                  "start": 0
                },
                {
                  "end": 26,
                  "role": "operand_b",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "interaction-operands-valid",
          "profile": "general-prose",
          "surface": "docs",
          "text": "valid interaction operands"
        }
      ],
      "incorrect": [
        {
          "captured": "invalid interaction operands",
          "check_input": {
            "expectation": {
              "attempt": {
                "composition_id": "compose.interaction",
                "member_id": null,
                "operand_a": "axis.open",
                "operand_b": "cascade.acuity-collapse",
                "type": "interaction.cascade-lock"
              },
              "components": [
                {
                  "end": 28,
                  "role": "type",
                  "start": 0
                },
                {
                  "end": 28,
                  "role": "operand_a",
                  "start": 0
                },
                {
                  "end": 28,
                  "role": "operand_b",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "interaction-operands-invalid",
          "outcome_id": "violation",
          "profile": "general-prose",
          "surface": "docs",
          "text": "invalid interaction operands"
        }
      ]
    },
    "id": "operand-kind",
    "outcomes": [
      {
        "disposition": "structural",
        "fix": {
          "interactive": "retry",
          "unattended": "retry"
        },
        "id": "violation"
      }
    ],
    "supersedes": []
  },
  {
    "examples": {
      "correct": [
        {
          "check_input": {
            "expectation": {
              "attempt": {
                "composition_id": "compose.interaction",
                "member_id": "interaction.directional-cross-compensation/compensation.anguishing/compensation.intellectualizing",
                "operand_a": "compensation.anguishing",
                "operand_b": "compensation.intellectualizing",
                "type": "interaction.directional-cross-compensation"
              },
              "components": [
                {
                  "end": 26,
                  "role": "type",
                  "start": 0
                },
                {
                  "end": 26,
                  "role": "operand_a",
                  "start": 0
                },
                {
                  "end": 26,
                  "role": "operand_b",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "interaction-direction-valid",
          "profile": "general-prose",
          "surface": "docs",
          "text": "valid directed interaction"
        }
      ],
      "incorrect": [
        {
          "captured": "invalid directed interaction",
          "check_input": {
            "expectation": {
              "attempt": {
                "composition_id": "compose.interaction",
                "member_id": null,
                "operand_a": "compensation.intellectualizing",
                "operand_b": "compensation.anguishing",
                "type": "interaction.directional-cross-compensation"
              },
              "components": [
                {
                  "end": 28,
                  "role": "type",
                  "start": 0
                },
                {
                  "end": 28,
                  "role": "operand_a",
                  "start": 0
                },
                {
                  "end": 28,
                  "role": "operand_b",
                  "start": 0
                }
              ],
              "kind": "composition-attempt"
            },
            "kind": "typed-value",
            "node": "notation_token"
          },
          "format": "text",
          "id": "interaction-direction-invalid",
          "outcome_id": "violation",
          "profile": "general-prose",
          "surface": "docs",
          "text": "invalid directed interaction"
        }
      ]
    },
    "id": "directionality",
    "outcomes": [
      {
        "disposition": "structural",
        "fix": {
          "interactive": "retry",
          "unattended": "retry"
        },
        "id": "violation"
      }
    ],
    "supersedes": []
  }
]