{
  "name": "define",
  "version": "1.2.0",
  "description": "Why the system exists and what it must do: goals and how success is measured, constraints, assumptions and open questions, then the actors, capabilities and glossary, and the precise requirements with the criteria that prove them. Rules keep every requirement traceable up to a goal and down to a test.",
  "license": "Apache-2.0",
  "publisher": "trumly",
  "namespace": "def",
  "tier": "verified",
  "role": "core",
  "useWhen": "Always, before any design. Use it to capture what the people who asked for the system want, in their words, before choosing how to build it.",
  "enriches": [],
  "requires": [
    "links@^1.0.0"
  ],
  "optional": [],
  "includes": [],
  "sha256": "810404dfc6ee299c1c3c3dc6daba126f5104f5534b64f9462b1c1683586fa3bc",
  "files": [
    [
      "def--capabilities",
      "---\nid: def--capabilities\ntype: plane\ntitle: Capabilities\nfields:\n  order: 2\n  stack: Define\n  stack_at:\n  - 2\n  - 0\n  shapes:\n    actor: person\n    capability: hexagon\n    concept: document\n  pack: define@1.2.0\n---\nWhat the system lets people do: who uses it, what they can do with it, and the shared vocabulary.\n"
    ],
    [
      "def--intent",
      "---\nid: def--intent\ntype: plane\ntitle: Intent\nfields:\n  order: 1\n  stack: Define\n  stack_at:\n  - 2\n  - 0\n  shapes:\n    assumption: circle 2d\n    constraint: shield\n    goal: star\n    metric: chevron\n    question: diamond\n  pack: define@1.2.0\n---\nWhy the system exists and the boundaries around it: the outcomes it must achieve, how success is measured, what cannot change, what is assumed and what is still undecided.\n"
    ],
    [
      "def--link-type-measured-by",
      "---\nid: def--link-type-measured-by\ntype: link-type\ntitle: measured-by\nfields:\n  name: measured-by\n  description: Use to say which metric shows whether a goal is met, a quality requirement is satisfied,\n    or an assumption still holds.\n  inverse: measures\n  from: []\n  to: []\n  pack: define@1.2.0\n---\n"
    ],
    [
      "def--link-type-performed-by",
      "---\nid: def--link-type-performed-by\ntype: link-type\ntitle: performed-by\nfields:\n  name: performed-by\n  description: Use to say which actor carries out a capability.\n  inverse: performs\n  from:\n  - capability\n  to:\n  - actor\n  pack: define@1.2.0\n---\n"
    ],
    [
      "def--link-type-refers-to",
      "---\nid: def--link-type-refers-to\ntype: link-type\ntitle: refers-to\nfields:\n  name: refers-to\n  description: Use to say which domain concept a goal, capability or requirement talks about.\n  inverse: referred to by\n  from:\n  - goal\n  - capability\n  - requirement\n  to:\n  - concept\n  pack: define@1.2.0\n---\n"
    ],
    [
      "def--pack",
      "---\nid: def--pack\ntype: pack\ntitle: Define\nfields:\n  name: define\n  namespace: def\n  version: 1.2.0\n  description: 'Why the system exists and what it must do: goals and how success is measured, constraints,\n    assumptions and open questions, then the actors, capabilities and glossary, and the precise requirements\n    with the criteria that prove them. Rules keep every requirement traceable up to a goal and down to\n    a test.'\n  license: Apache-2.0\n  publisher: trumly\n  default-pattern: goal-to-proof\n  role: core\n  use-when: Always, before any design. Use it to capture what the people who asked for the system want,\n    in their words, before choosing how to build it.\n  requires:\n  - links@^1.0.0\n---\n"
    ],
    [
      "def--requirements",
      "---\nid: def--requirements\ntype: plane\ntitle: Requirements\nfields:\n  order: 3\n  stack: Define\n  stack_at:\n  - 2\n  - 0\n  shapes:\n    acceptance-criterion: square\n    requirement: document\n  pack: define@1.2.0\n---\nThe precise, testable statements behind each capability, and the criteria that prove them.\n"
    ],
    [
      "def--rule-accepted-needs-human",
      "---\nid: def--rule-accepted-needs-human\ntype: rule\ntitle: Accepted needs a person\nfields:\n  name: Accepted needs a person\n  statement: Accepted nodes record accepted-by and accepted-on\n  severity: error\n  applies_to:\n    status: accepted\n  check:\n    require_fields:\n    - accepted-by\n    - accepted-on\n  pack: define@1.2.0\n---\n**Why:** agents propose, humans accept.\n\n**Fix:** record who accepted it and when.\n"
    ],
    [
      "def--rule-accepted-no-open-question",
      "---\nid: def--rule-accepted-no-open-question\ntype: rule\ntitle: Accepted has no open question\nfields:\n  name: Accepted has no open question\n  statement: Accepted nodes have no open question about them\n  severity: error\n  applies_to:\n    status: accepted\n  check:\n    forbid_link:\n      dir: in\n      node_fields:\n        state: open\n      type: about\n  pack: define@1.2.0\n---\n**Why:** an open question means the node is not settled.\n\n**Fix:** answer the question, or move the node back to proposed.\n"
    ],
    [
      "def--rule-actor-performs",
      "---\nid: def--rule-actor-performs\ntype: rule\ntitle: Actors do something\nfields:\n  name: Actors do something\n  statement: Every actor performs at least one capability\n  severity: warn\n  applies_to:\n    type: actor\n  check:\n    require_link:\n      dir: in\n      min: 1\n      node_type: capability\n      type: performed-by\n  pack: define@1.2.0\n---\n**Why:** a role that performs no capability has no reason to be in the design.\n\n**Fix:** link a capability to it with `performed-by`, or remove the actor.\n"
    ],
    [
      "def--rule-answered-question-has-answer",
      "---\nid: def--rule-answered-question-has-answer\ntype: rule\ntitle: Answered needs an answer\nfields:\n  name: Answered needs an answer\n  statement: An answered question records its answer\n  severity: error\n  applies_to:\n    state: answered\n    type: question\n  check:\n    require_fields:\n    - answer\n  pack: define@1.2.0\n---\n**Why:** the answer is the point. Without it the affected nodes cannot be updated.\n\n**Fix:** fill in the answer, then update the nodes the question was about.\n"
    ],
    [
      "def--rule-assumption-checkable",
      "---\nid: def--rule-assumption-checkable\ntype: rule\ntitle: Assumptions can be checked\nfields:\n  name: Assumptions can be checked\n  statement: Every assumption has how-to-check and an owner\n  severity: error\n  applies_to:\n    type: assumption\n  check:\n    require_fields:\n    - how-to-check\n    - owner\n  pack: define@1.2.0\n---\n**Why:** an assumption nobody owns or tests quietly becomes a fact.\n\n**Fix:** fill in how-to-check and owner.\n"
    ],
    [
      "def--rule-assumption-evidence",
      "---\nid: def--rule-assumption-evidence\ntype: rule\ntitle: Validated needs evidence\nfields:\n  name: Validated needs evidence\n  statement: A validated assumption cites its evidence\n  severity: warn\n  applies_to:\n    state: validated\n    type: assumption\n  check:\n    require_fields:\n    - evidence\n  pack: define@1.2.0\n---\n**Why:** validated or invalidated needs something to point at.\n\n**Fix:** fill in evidence.\n"
    ],
    [
      "def--rule-assumption-invalidated-evidence",
      "---\nid: def--rule-assumption-invalidated-evidence\ntype: rule\ntitle: Invalidated needs evidence\nfields:\n  name: Invalidated needs evidence\n  statement: An invalidated assumption cites its evidence\n  severity: warn\n  applies_to:\n    state: invalidated\n    type: assumption\n  check:\n    require_fields:\n    - evidence\n  pack: define@1.2.0\n---\n**Why:** see what showed it was wrong.\n\n**Fix:** fill in evidence.\n"
    ],
    [
      "def--rule-capability-derives-from-goal",
      "---\nid: def--rule-capability-derives-from-goal\ntype: rule\ntitle: Capabilities trace to a goal\nfields:\n  name: Capabilities trace to a goal\n  statement: Every capability derives from a goal\n  severity: error\n  applies_to:\n    type: capability\n  check:\n    require_link:\n      min: 1\n      node_type: goal\n      type: derives-from\n  pack: define@1.2.0\n---\n**Why:** capabilities without a goal are scope creep.\n\n**Fix:** add a `derives-from` link to the goal it serves.\n"
    ],
    [
      "def--rule-capability-has-requirement",
      "---\nid: def--rule-capability-has-requirement\ntype: rule\ntitle: Capabilities are specified\nfields:\n  name: Capabilities are specified\n  statement: Every in-scope capability has at least one requirement\n  severity: warn\n  applies_to:\n    scope: in\n    type: capability\n  check:\n    require_link:\n      dir: in\n      min: 1\n      node_type: requirement\n      type: derives-from\n  pack: define@1.2.0\n---\n**Why:** a capability with no requirement is not yet precise enough to build or test.\n\n**Fix:** add a requirement that `derives-from` this capability.\n"
    ],
    [
      "def--rule-capability-performed-by",
      "---\nid: def--rule-capability-performed-by\ntype: rule\ntitle: Capabilities have an actor\nfields:\n  name: Capabilities have an actor\n  statement: Every capability is performed by an actor\n  severity: error\n  applies_to:\n    type: capability\n  check:\n    require_link:\n      min: 1\n      node_type: actor\n      type: performed-by\n  pack: define@1.2.0\n---\n**Why:** if nobody uses it, it is not a capability.\n\n**Fix:** add a `performed-by` link to an actor.\n"
    ],
    [
      "def--rule-concept-used",
      "---\nid: def--rule-concept-used\ntype: rule\ntitle: Glossary terms are used\nfields:\n  name: Glossary terms are used\n  statement: Every concept is referred to by something\n  severity: info\n  applies_to:\n    type: concept\n  check:\n    require_link:\n      dir: in\n      min: 1\n      type: refers-to\n  pack: define@1.2.0\n---\nAdvisory. A glossary term that nothing refers to may be unnecessary, or the nodes that use it may be missing links.\n\n**Fix:** add `refers-to` from the node that uses the term, or drop it.\n"
    ],
    [
      "def--rule-constraint-governs",
      "---\nid: def--rule-constraint-governs\ntype: rule\ntitle: Constraints govern something\nfields:\n  name: Constraints govern something\n  statement: Every constraint governs at least one node\n  severity: warn\n  applies_to:\n    type: constraint\n  check:\n    require_link:\n      min: 1\n      type: governs\n  pack: define@1.2.0\n---\n**Why:** a constraint that limits nothing is noise.\n\n**Fix:** add a `governs` link to what it limits.\n"
    ],
    [
      "def--rule-criterion-verifies-requirement",
      "---\nid: def--rule-criterion-verifies-requirement\ntype: rule\ntitle: Criteria prove a requirement\nfields:\n  name: Criteria prove a requirement\n  statement: Every acceptance criterion verifies a requirement\n  severity: error\n  applies_to:\n    type: acceptance-criterion\n  check:\n    require_link:\n      dir: in\n      min: 1\n      node_type: requirement\n      type: verified-by\n  pack: define@1.2.0\n---\n**Why:** an orphan test proves nothing anyone asked for.\n\n**Fix:** link a requirement to it with `verified-by`.\n"
    ],
    [
      "def--rule-functional-requirement-verified",
      "---\nid: def--rule-functional-requirement-verified\ntype: rule\ntitle: Functional has a criterion\nfields:\n  name: Functional has a criterion\n  statement: Every functional requirement is verified by an acceptance criterion\n  severity: error\n  applies_to:\n    kind: functional\n    type: requirement\n  check:\n    require_link:\n      min: 1\n      node_type: acceptance-criterion\n      type: verified-by\n  pack: define@1.2.0\n---\n**Why:** if you cannot say how you would prove it, it is not clear enough.\n\n**Fix:** add an acceptance criterion and link it with `verified-by`.\n"
    ],
    [
      "def--rule-goal-has-capability",
      "---\nid: def--rule-goal-has-capability\ntype: rule\ntitle: Goals have a capability\nfields:\n  name: Goals have a capability\n  statement: Every goal has at least one capability deriving from it\n  severity: warn\n  applies_to:\n    type: goal\n  check:\n    require_link:\n      dir: in\n      min: 1\n      node_type: capability\n      type: derives-from\n  pack: define@1.2.0\n---\n**Why:** a goal with no capability has no plan behind it.\n\n**Fix:** add a capability with a `derives-from` link to the goal.\n"
    ],
    [
      "def--rule-goal-measured",
      "---\nid: def--rule-goal-measured\ntype: rule\ntitle: Goals have a metric\nfields:\n  name: Goals have a metric\n  statement: Every goal is measured by a metric\n  severity: error\n  applies_to:\n    type: goal\n  check:\n    require_link:\n      min: 1\n      node_type: metric\n      type: measured-by\n  pack: define@1.2.0\n---\n**Why:** a goal nobody can measure cannot be seen to succeed or fail.\n\n**Fix:** add a `measured-by` link to a metric.\n"
    ],
    [
      "def--rule-invalidated-assumption-not-relied-on",
      "---\nid: def--rule-invalidated-assumption-not-relied-on\ntype: rule\ntitle: Not built on false ground\nfields:\n  name: Not built on false ground\n  statement: No accepted node relies on an invalidated assumption\n  severity: error\n  applies_to:\n    state: invalidated\n    type: assumption\n  check:\n    forbid_link:\n      dir: in\n      node_fields:\n        status: accepted\n      type: relies-on\n  pack: define@1.2.0\n---\n**Why:** an accepted decision built on an invalidated assumption needs revisiting.\n\n**Fix:** revisit the node and change its status, or replace the assumption.\n"
    ],
    [
      "def--rule-metric-complete",
      "---\nid: def--rule-metric-complete\ntype: rule\ntitle: Metrics are measurable\nfields:\n  name: Metrics are measurable\n  statement: Every metric has a unit, a target and how it is measured\n  severity: error\n  applies_to:\n    type: metric\n  check:\n    require_fields:\n    - unit\n    - target\n    - how-measured\n  pack: define@1.2.0\n---\n**Why:** a target with no unit or method cannot be checked.\n\n**Fix:** fill in unit, target and how-measured.\n"
    ],
    [
      "def--rule-metric-used",
      "---\nid: def--rule-metric-used\ntype: rule\ntitle: Metrics measure something\nfields:\n  name: Metrics measure something\n  statement: Every metric measures a goal, requirement or assumption\n  severity: warn\n  applies_to:\n    type: metric\n  check:\n    require_link:\n      dir: in\n      min: 1\n      type: measured-by\n  pack: define@1.2.0\n---\n**Why:** a metric nothing refers to is a number nobody asked for.\n\n**Fix:** link it from the goal, requirement or assumption it measures with `measured-by`.\n"
    ],
    [
      "def--rule-no-requirement-for-out-of-scope",
      "---\nid: def--rule-no-requirement-for-out-of-scope\ntype: rule\ntitle: No specs for out-of-scope\nfields:\n  name: No specs for out-of-scope\n  statement: No requirement derives from an out-of-scope capability\n  severity: error\n  applies_to:\n    type: requirement\n  check:\n    forbid_link:\n      node_fields:\n        scope: out\n      node_type: capability\n      type: derives-from\n  pack: define@1.2.0\n---\n**Why:** out of scope means nobody should design or build it yet.\n\n**Fix:** drop the requirement, or change the capability's scope.\n"
    ],
    [
      "def--rule-quality-requirement-attribute",
      "---\nid: def--rule-quality-requirement-attribute\ntype: rule\ntitle: Quality names its attribute\nfields:\n  name: Quality names its attribute\n  statement: Every quality requirement names a quality attribute\n  severity: error\n  applies_to:\n    kind: quality\n    type: requirement\n  check:\n    require_fields:\n    - quality-attribute\n  pack: define@1.2.0\n---\n**Why:** the attribute (performance, security, reliability...) tells readers which design decisions it will shape.\n\n**Fix:** set quality-attribute.\n"
    ],
    [
      "def--rule-quality-requirement-measured",
      "---\nid: def--rule-quality-requirement-measured\ntype: rule\ntitle: Quality needs a metric\nfields:\n  name: Quality needs a metric\n  statement: Every quality requirement is measured by a metric\n  severity: error\n  applies_to:\n    kind: quality\n    type: requirement\n  check:\n    require_link:\n      min: 1\n      node_type: metric\n      type: measured-by\n  pack: define@1.2.0\n---\n**Why:** \"fast\" and \"secure\" mean nothing until there is a number.\n\n**Fix:** add a metric and link it with `measured-by`.\n"
    ],
    [
      "def--rule-question-about",
      "---\nid: def--rule-question-about\ntype: rule\ntitle: Questions are about a node\nfields:\n  name: Questions are about a node\n  statement: Every question is about a node\n  severity: error\n  applies_to:\n    type: question\n  check:\n    require_link:\n      min: 1\n      type: about\n  pack: define@1.2.0\n---\n**Why:** the question blocks what it is about.\n\n**Fix:** add an `about` link.\n"
    ],
    [
      "def--rule-requirement-derives-from",
      "---\nid: def--rule-requirement-derives-from\ntype: rule\ntitle: Requirements have a source\nfields:\n  name: Requirements have a source\n  statement: Every requirement derives from a capability\n  severity: error\n  applies_to:\n    type: requirement\n  check:\n    require_link:\n      min: 1\n      node_type: capability\n      type: derives-from\n  pack: define@1.2.0\n---\n**Why:** requirements need a reason to exist.\n\n**Fix:** add a `derives-from` link to a capability.\n"
    ],
    [
      "def--rule-volume-metric-threshold",
      "---\nid: def--rule-volume-metric-threshold\ntype: rule\ntitle: Volume metrics have a limit\nfields:\n  name: Volume metrics have a limit\n  statement: Every volume metric has a threshold\n  severity: warn\n  applies_to:\n    kind: volume\n    type: metric\n  check:\n    require_fields:\n    - threshold\n  pack: define@1.2.0\n---\n**Why:** the threshold is the point at which the design should change; later change sets can watch it.\n\n**Fix:** set threshold.\n"
    ],
    [
      "def--type-acceptance-criterion",
      "---\nid: def--type-acceptance-criterion\ntype: type\ntitle: acceptance-criterion\nfields:\n  name: acceptance-criterion\n  plane: def--requirements\n  description: 'Use for the concrete check that proves a requirement is met: what is set up, what happens\n    and what must result. It is the contract between the people who ask and the people who build.'\n  shape: square\n  fields:\n  - name: given\n    kind: text\n  - name: when\n    kind: text\n  - name: then\n    kind: text\n    required: true\n  - name: method\n    kind: choice\n    required: true\n    values:\n    - test\n    - inspection\n    - demonstration\n    - analysis\n  pack: define@1.2.0\n---\n**Ask:** How would we show this is met? What would we set up, what would we do, what must we see?\n\nGiven / when / then keeps it concrete. Choose the method honestly: automated or manual **test**, **inspection** of an artefact, a live **demonstration**, or **analysis** (a calculation or review). Link it from its requirement with `verified-by`.\n"
    ],
    [
      "def--type-actor",
      "---\nid: def--type-actor\ntype: type\ntitle: actor\nfields:\n  name: actor\n  plane: def--capabilities\n  description: Use for a kind of person (a role) who uses or runs the system. Every capability is performed\n    by an actor.\n  shape: person\n  fields: []\n  pack: define@1.2.0\n---\n**Ask:** Who uses it? Who runs it?\n\nAn actor is a role, not a named individual, and not the model's audience. An outside system that calls this one is an `external`, not an actor.\n"
    ],
    [
      "def--type-assumption",
      "---\nid: def--type-assumption\ntype: type\ntitle: assumption\nfields:\n  name: assumption\n  plane: def--intent\n  description: Use for something believed true but not yet proven, that the design leans on. Say how it\n    will be checked and who owns checking it. Volumes and user behaviour are the usual suspects.\n  shape: circle 2d\n  fields:\n  - name: statement\n    kind: text\n    required: true\n  - name: how-to-check\n    kind: text\n    required: true\n  - name: owner\n    kind: text\n    required: true\n  - name: state\n    kind: choice\n    required: true\n    values:\n    - open\n    - validated\n    - invalidated\n  - name: evidence\n    kind: text\n  pack: define@1.2.0\n---\n**Ask:** What are we taking for granted? What would change if it were wrong? How and when will we find out, and who will?\n\nLink the things that depend on it with `relies-on`. When it is validated or invalidated, record the evidence. An invalidated assumption must not sit under anything accepted.\n"
    ],
    [
      "def--type-capability",
      "---\nid: def--type-capability\ntype: type\ntitle: capability\nfields:\n  name: capability\n  plane: def--capabilities\n  description: Use for something an actor must be able to do with the system, in plain words. It is the\n    bridge between goals and precise requirements, and the place non-technical people do most of their\n    thinking.\n  shape: hexagon\n  fields:\n  - name: statement\n    kind: text\n    label: An actor can…\n    required: true\n  - name: scope\n    kind: choice\n    required: true\n    values:\n    - in\n    - later\n    - out\n  - name: priority\n    kind: choice\n    required: true\n    values:\n    - must\n    - should\n    - could\n  - name: status\n    kind: choice\n    required: true\n    values:\n    - draft\n    - proposed\n    - accepted\n    - planned\n    - built\n    - verified\n    - dropped\n  - name: accepted-by\n    kind: text\n    label: Accepted by (a person)\n  - name: accepted-on\n    kind: text\n    label: Accepted on (date)\n  pack: define@1.2.0\n---\n**Ask:** What does the actor need to be able to do? Why, which goal does it serve? Is it in scope now, later or never?\n\nWrite it as \"an actor can do something\". Put the normal flow in the body. Mark exclusions as scope `out` so they are explicit decisions. Requirements link up to it with `derives-from`.\n"
    ],
    [
      "def--type-concept",
      "---\nid: def--type-concept\ntype: type\ntitle: concept\nfields:\n  name: concept\n  plane: def--capabilities\n  description: Use for a term of the business or domain that the design relies on, such as an order, a\n    job or a customer. It is the shared glossary, and the seed of the data model.\n  shape: document\n  fields:\n  - name: definition\n    kind: text\n    required: true\n  pack: define@1.2.0\n---\n**Ask:** Which words does the team use that an outsider would misread? What do they mean here?\n\nConcepts later become entities in the data model. Keep the definition to a sentence or two, and link the capabilities and requirements that use the term with `refers-to`.\n"
    ],
    [
      "def--type-constraint",
      "---\nid: def--type-constraint\ntype: type\ntitle: constraint\nfields:\n  name: constraint\n  plane: def--intent\n  description: 'Use for a limit imposed from outside that the design must live within: a law, a budget,\n    a deadline, a mandated technology. If it can be negotiated, it is a requirement instead.'\n  shape: shield\n  fields:\n  - name: statement\n    kind: text\n    required: true\n  - name: kind\n    kind: choice\n    required: true\n    values:\n    - legal\n    - budget\n    - schedule\n    - technology\n    - organisation\n    - other\n  - name: source\n    kind: text\n    label: Who or what imposes it\n    required: true\n  - name: status\n    kind: choice\n    required: true\n    values:\n    - draft\n    - proposed\n    - accepted\n    - dropped\n  - name: accepted-by\n    kind: text\n    label: Accepted by (a person)\n  - name: accepted-on\n    kind: text\n    label: Accepted on (date)\n  pack: define@1.2.0\n---\n**Ask:** What is fixed that we did not choose? Who set it? What does it limit?\n\n**Watch for:** preferences disguised as constraints. If it can be negotiated it is a requirement or a decision. Link it to what it limits with `governs`, including design nodes such as a cloud provider.\n"
    ],
    [
      "def--type-goal",
      "---\nid: def--type-goal\ntype: type\ntitle: goal\nfields:\n  name: goal\n  plane: def--intent\n  description: 'Use for an outcome the system exists to achieve, stated as a result rather than a feature.\n    Every goal needs a measure of success. Keep the list short: three to five goals is plenty.'\n  shape: star\n  fields:\n  - name: statement\n    kind: text\n    required: true\n  - name: status\n    kind: choice\n    required: true\n    values:\n    - draft\n    - proposed\n    - accepted\n    - achieved\n    - dropped\n  - name: accepted-by\n    kind: text\n    label: Accepted by (a person)\n  - name: accepted-on\n    kind: text\n    label: Accepted on (date)\n  pack: define@1.2.0\n---\n**Ask:** What would be different if this succeeds? How would you know, with a number? Who cares most?\n\n**Watch for:** goals that describe features (\"build a dashboard\") rather than outcomes. A goal needs a `measured-by` metric before it can be accepted.\n\nCapabilities link up to it with `derives-from`.\n"
    ],
    [
      "def--type-metric",
      "---\nid: def--type-metric\ntype: type\ntitle: metric\nfields:\n  name: metric\n  plane: def--intent\n  description: 'Use for a named, measurable quantity: a success measure for a goal, a target for a quality\n    requirement, or an expected volume. Say how it is measured, its target, and for volumes the threshold\n    that should trigger a rethink.'\n  shape: chevron\n  fields:\n  - name: kind\n    kind: choice\n    required: true\n    values:\n    - success\n    - quality\n    - volume\n  - name: unit\n    kind: text\n    required: true\n  - name: direction\n    kind: choice\n    required: true\n    values:\n    - higher-is-better\n    - lower-is-better\n  - name: target\n    kind: number\n    required: true\n  - name: threshold\n    kind: number\n    label: Threshold that triggers a rethink\n  - name: current\n    kind: number\n    label: Current value\n  - name: how-measured\n    kind: text\n    required: true\n  - name: review-by\n    kind: text\n    label: Review by (date)\n  pack: define@1.2.0\n---\n**Ask:** What number would tell you? Where does it come from? What value is good enough, and what value means the design needs to change?\n\nOne metric type serves three jobs, chosen by `kind`:\n- **success**: how a goal is judged\n- **quality**: the target behind a quality requirement\n- **volume**: expected load or size, with a `threshold` that says when to revisit the design\n\nThe threshold is what lets a design react to growth later.\n"
    ],
    [
      "def--type-question",
      "---\nid: def--type-question\ntype: type\ntitle: question\nfields:\n  name: question\n  plane: def--intent\n  description: Use for anything that needs a human decision before the design can move on. Agents raise\n    a question instead of guessing. An open question blocks acceptance of what it is about.\n  shape: diamond\n  fields:\n  - name: state\n    kind: choice\n    required: true\n    values:\n    - open\n    - answered\n  - name: raised-by\n    kind: text\n    required: true\n  - name: answer\n    kind: text\n  - name: body\n    kind: text\n    label: Description\n    required: true\n  pack: define@1.2.0\n---\n**Ask (the AI asks itself):** Am I about to guess? If a decision is the person's to make, record it here instead of choosing.\n\nPut the question in full in the description, since the title is only a short label. Link it to what it is about with `about`. While it is open, nothing it concerns can be accepted. When answered, record the answer and then update the affected nodes.\n"
    ],
    [
      "def--type-requirement",
      "---\nid: def--type-requirement\ntype: type\ntitle: requirement\nfields:\n  name: requirement\n  plane: def--requirements\n  description: Use for one precise, testable statement of what the system must do (functional) or how\n    well it must do it (quality). Each one traces up to a capability or goal and down to the proof that\n    it is met.\n  shape: document\n  fields:\n  - name: statement\n    kind: text\n    required: true\n  - name: kind\n    kind: choice\n    required: true\n    values:\n    - functional\n    - quality\n  - name: quality-attribute\n    kind: choice\n    label: Quality attribute (quality only)\n    values:\n    - functional-suitability\n    - performance-efficiency\n    - compatibility\n    - usability\n    - reliability\n    - security\n    - maintainability\n    - portability\n  - name: pattern\n    kind: choice\n    values:\n    - ubiquitous\n    - event-driven\n    - state-driven\n    - unwanted-behaviour\n    - optional-feature\n    - complex\n  - name: priority\n    kind: choice\n    required: true\n    values:\n    - must\n    - should\n    - could\n  - name: status\n    kind: choice\n    required: true\n    values:\n    - draft\n    - proposed\n    - accepted\n    - planned\n    - built\n    - verified\n    - dropped\n  - name: accepted-by\n    kind: text\n    label: Accepted by (a person)\n  - name: accepted-on\n    kind: text\n    label: Accepted on (date)\n  - name: rationale\n    kind: text\n  pack: define@1.2.0\n---\n**Ask:** What exactly must the system do or be? Can one test or measurement settle whether it is met? Is it one thing, not two?\n\n**Pattern (EARS), optional but helpful:**\n- ubiquitous: \"The system shall…\"\n- event-driven: \"When X, the system shall…\"\n- state-driven: \"While X, the system shall…\"\n- unwanted behaviour: \"If X, then the system shall…\"\n- optional feature: \"Where X, the system shall…\"\n\n**Watch for:** vague words (fast, easy, secure). Quality requirements must point at a metric with a number. Functional requirements need an acceptance criterion.\n"
    ],
    [
      "examples/ops-api-define/acceptance-criterion-jobs-listed",
      "---\nid: acceptance-criterion-jobs-listed\ntype: acceptance-criterion\ntitle: Jobs listed\nplane: def--requirements\nfields:\n  given: A job has just changed state\n  when: Ops staff open the job list\n  then: The job and its new state are shown within 60 seconds\n  method: test\n---\n"
    ],
    [
      "examples/ops-api-define/actor-ops-staff",
      "---\nid: actor-ops-staff\ntype: actor\ntitle: Ops staff\nplane: def--capabilities\n---\n"
    ],
    [
      "examples/ops-api-define/assumption-job-volume",
      "---\nid: assumption-job-volume\ntype: assumption\ntitle: Job volume stays modest\nplane: def--intent\nfields:\n  statement: No more than 5,000 jobs run each night.\n  how-to-check: Count the nightly jobs for a month\n  owner: Platform\n  state: open\n---\n"
    ],
    [
      "examples/ops-api-define/capability-view-job-status",
      "---\nid: capability-view-job-status\ntype: capability\ntitle: View job status\nplane: def--capabilities\nfields:\n  statement: view the current status of every job\n  scope: in\n  priority: must\n  status: proposed\nlinks:\n- type: performed-by\n  to: actor-ops-staff\n- type: derives-from\n  to: goal-timely-visibility\n- type: refers-to\n  to: concept-job\n- type: relies-on\n  to: assumption-job-volume\n---\n"
    ],
    [
      "examples/ops-api-define/concept-job",
      "---\nid: concept-job\ntype: concept\ntitle: Job\nplane: def--capabilities\nfields:\n  definition: A scheduled piece of work run for a customer.\n---\n"
    ],
    [
      "examples/ops-api-define/constraint-uk-eu-data",
      "---\nid: constraint-uk-eu-data\ntype: constraint\ntitle: Data stays in UK/EU\nplane: def--intent\nfields:\n  statement: Customer data stays in the UK or the EU.\n  kind: legal\n  source: Customer contracts\n  status: proposed\nlinks:\n- type: governs\n  to: capability-view-job-status\n---\n"
    ],
    [
      "examples/ops-api-define/example",
      "---\nid: example\ntype: example\ntitle: What the ops API must do\nfields:\n  title: What the ops API must do\n  description: A goal with its measure, who uses it, what they can do, the requirement and the test that\n    proves it, with an assumption, a constraint and an open question.\n  use: starter\n  requires:\n  - define\n---\n"
    ],
    [
      "examples/ops-api-define/goal-timely-visibility",
      "---\nid: goal-timely-visibility\ntype: goal\ntitle: Timely ops visibility\nplane: def--intent\nfields:\n  statement: Operations staff see the state of every job within a minute.\n  status: proposed\nlinks:\n- type: measured-by\n  to: metric-status-freshness\n---\n"
    ],
    [
      "examples/ops-api-define/metric-status-freshness",
      "---\nid: metric-status-freshness\ntype: metric\ntitle: Job status age\nplane: def--intent\nfields:\n  kind: success\n  unit: seconds\n  direction: lower-is-better\n  target: 60\n  how-measured: Age of the newest status for each job, sampled every minute\n---\n"
    ],
    [
      "examples/ops-api-define/question-who-sees-jobs",
      "---\nid: question-who-sees-jobs\ntype: question\ntitle: Who else sees jobs\nplane: def--intent\nfields:\n  state: open\n  raised-by: agent\nlinks:\n- type: about\n  to: capability-view-job-status\n---\nShould staff outside operations be able to see the job list, or only ops staff?\n"
    ],
    [
      "examples/ops-api-define/requirement-list-jobs",
      "---\nid: requirement-list-jobs\ntype: requirement\ntitle: List jobs\nplane: def--requirements\nfields:\n  statement: The system shall list every job with its current status.\n  kind: functional\n  priority: must\n  status: proposed\nlinks:\n  - type: verified-by\n    to: acceptance-criterion-jobs-listed\n  - type: derives-from\n    to: capability-view-job-status\n---\n"
    ],
    [
      "patterns/goal-to-proof/actor",
      "---\nid: actor\ntype: actor\ntitle: Who does it\nplane: def--capabilities\n---\nThe person or system that needs the capability.\n"
    ],
    [
      "patterns/goal-to-proof/capability",
      "---\nid: capability\ntype: capability\ntitle: What they can do\nplane: def--capabilities\nfields:\n  statement: do the thing the goal needs\n  scope: in\n  priority: must\n  status: proposed\nlinks:\n- type: derives-from\n  to: goal\n- type: performed-by\n  to: actor\n---\n"
    ],
    [
      "patterns/goal-to-proof/criterion",
      "---\nid: criterion\ntype: acceptance-criterion\ntitle: The test that proves it\nplane: def--requirements\nfields:\n  given: A starting situation\n  when: Something happens\n  then: The result you expect\n  method: test\n---\n"
    ],
    [
      "patterns/goal-to-proof/goal",
      "---\nid: goal\ntype: goal\ntitle: What we want\nplane: def--intent\nfields:\n  statement: Say what you want to be true, in one sentence.\n  status: proposed\nlinks:\n- type: measured-by\n  to: metric\n---\nThe outcome the rest of the chain serves.\n"
    ],
    [
      "patterns/goal-to-proof/metric",
      "---\nid: metric\ntype: metric\ntitle: How we will know\nplane: def--intent\nfields:\n  kind: success\n  unit: seconds\n  direction: lower-is-better\n  target: 60\n  how-measured: Say how and how often it is measured\n---\nReplace the unit and target with your own.\n"
    ],
    [
      "patterns/goal-to-proof/pattern",
      "---\nid: pattern\ntype: pattern\ntitle: Goal to proof\nfields:\n  title: Goal to proof\n  description: The whole chain for one thing you want, from the goal and how you will measure it, through what people must be able to do, to a requirement and the test that proves it. Add it, then rewrite each node in your own words.\n  use: starter\n  requires:\n  - define\n  root: goal\n  prefix: want\n---\n"
    ],
    [
      "patterns/goal-to-proof/requirement",
      "---\nid: requirement\ntype: requirement\ntitle: How well it must work\nplane: def--requirements\nfields:\n  statement: The system shall do the thing, measured against the target above.\n  kind: functional\n  priority: must\n  status: proposed\nlinks:\n- type: derives-from\n  to: capability\n- type: verified-by\n  to: criterion\n---\n"
    ]
  ]
}
