Bow Tie Kreative Writing System

Rules / technical writing

TEC-014 Hard constraint layer: section

API reference exposes contract

IF an endpoint, function, event, or schema is documented, THEN specify inputs, types, requiredness, constraints, outputs, errors, examples, and version ELSE mark incomplete.

Why the rule exists

A technical reference is a contract between producer and consumer.

Condition

The rule fires when this evaluates true. Paths marked below must be present in the fact base; the engine reports the rest rather than guessing them.

  • section.reference_entity_type in [endpoint, function, event, schema]

Facts this rule reads

Fact paths read by TEC-014 and whether the analyser derives them
PathSource
section.reference_entity_type You supply it

Then

  1. complete — target section.contract

Else

  1. retain — target current_text, No triggering condition is present.

LAKA

Smallest sufficient intervention
Yes
Primary axes

Sources

  • Technical Writing 101 — Alan Pringle; Sarah O’Keefe
    Real-world documentation and structured authoring.
  • Developing Quality Technical Information — Michelle Carey; Moira Lanyi; Deirdre Longo; et al.
    Quality dimensions for usable technical information.
The raw rule record

Verbatim from 15-technical-writing-rules.json. Also available at /v1/rules/TEC-014.

{
  "id": "TEC-014",
  "name": "API reference exposes contract",
  "domain": "technical_writing",
  "layer": "section",
  "strength": "hard_constraint",
  "human_logic": "IF an endpoint, function, event, or schema is documented, THEN specify inputs, types, requiredness, constraints, outputs, errors, examples, and version ELSE mark incomplete.",
  "when": {
    "path": "section.reference_entity_type",
    "operator": "in",
    "value": [
      "endpoint",
      "function",
      "event",
      "schema"
    ]
  },
  "then": [
    {
      "action": "complete",
      "target": "section.contract",
      "fields": [
        "inputs",
        "types",
        "requiredness",
        "constraints",
        "outputs",
        "errors",
        "examples",
        "version"
      ]
    }
  ],
  "else": [
    {
      "action": "retain",
      "target": "current_text",
      "reason": "No triggering condition is present."
    }
  ],
  "unless": [],
  "because": "A technical reference is a contract between producer and consumer.",
  "diagnostics": [],
  "examples": {},
  "source_ids": [
    "BK-023",
    "BK-024"
  ],
  "laka": {
    "smallest_sufficient_intervention": true,
    "primary_axes": [
      "scope",
      "depth",
      "magnitude",
      "reversibility"
    ]
  }
}

Other technical writing rules

  1. TEC-001 Choose an information type IF a technical topic is being created, THEN classify it as concept, task, reference, troubleshooting, glossary, or mixed with explicit boundaries ELSE do not draft a generic blob. Hard constraint
  2. TEC-002 Concept answers what and why IF the reader asks what something is or why it matters, THEN use a concept topic with definition, model, relationship, boundary, and example ELSE select another type. Context default
  3. TEC-003 Task answers how to achieve a goal IF the reader wants to achieve an outcome, THEN use a task topic with goal, prerequisites, steps, results, recovery, and verification ELSE select another type. Context default
  4. TEC-004 Reference supports lookup IF the reader needs facts about an entity or interface, THEN use stable repeated fields, valid values, defaults, constraints, examples, and links ELSE select another type. Context default
  5. TEC-005 Prerequisites before steps IF a task requires permissions, state, tools, knowledge, inputs, or safety conditions, THEN list them before step 1 ELSE state that none are required only when useful. Hard constraint
  6. TEC-006 Imperative starts the step IF the reader performs a procedural action, THEN start with a specific imperative verb and name the object ELSE name the actual actor. Context default
  7. TEC-007 Expected result follows uncertain action IF a step’s success is not self-evident, THEN state the observable result immediately after it ELSE retain. Context default
  8. TEC-008 Recovery follows known failure IF a step has a common or consequential failure mode, THEN provide symptom, cause or check, corrective action, and verification ELSE retain. Context default