{
  "name": "hosting",
  "version": "0.1.0",
  "description": "Who provides the infrastructure and which of their products realise your design: cloud providers and cloud services, attached to environments, datastores, queues and components with details. Say that the operations database runs on RDS in AWS without changing the design underneath.",
  "license": "Apache-2.0",
  "publisher": "trumly",
  "namespace": "hst",
  "tier": "verified",
  "role": "enrichment",
  "useWhen": "When you need to say who provides the infrastructure and which of their services realise a datastore, queue or component, for example that the operations database runs on RDS in AWS.",
  "enriches": [
    "environment",
    "datastore",
    "queue",
    "component"
  ],
  "requires": [
    "core@^1.0.0"
  ],
  "optional": [],
  "includes": [],
  "sha256": "c05c06fcbc731857f895c3ae3392693f514fa543a7d935b3ebbdf5f918fd0a58",
  "files": [
    [
      "hst--hosting",
      "---\nid: hst--hosting\ntype: plane\ntitle: Hosting\nfields:\n  order: 1\n  stack: Hosting\n  shapes:\n    cloud-provider: cloud\n    cloud-service: hexagon 2d\n  pack: hosting@0.1.0\n---\nWho provides the infrastructure and the products that realise the design. Attached to core nodes with details; core stays whole without it.\n"
    ],
    [
      "hst--pack",
      "---\nid: hst--pack\ntype: pack\ntitle: Hosting\nfields:\n  name: hosting\n  namespace: hst\n  version: 0.1.0\n  license: Apache-2.0\n  publisher: trumly\n  role: enrichment\n  enriches:\n  - environment\n  - datastore\n  - queue\n  - component\n  description: 'Who provides the infrastructure and which of their products realise your design: cloud\n    providers and cloud services, attached to environments, datastores, queues and components with details.\n    Say that the operations database runs on RDS in AWS without changing the design underneath.'\n  use-when: When you need to say who provides the infrastructure and which of their services realise a\n    datastore, queue or component, for example that the operations database runs on RDS in AWS.\n  requires:\n  - core@^1.0.0\n---\n"
    ],
    [
      "hst--rule-provider-used",
      "---\nid: hst--rule-provider-used\ntype: rule\ntitle: Providers host something\nfields:\n  name: Providers host something\n  statement: Every cloud provider hosts at least one service\n  severity: warn\n  applies_to:\n    type: cloud-provider\n  check:\n    require_link:\n      dir: in\n      min: 1\n      node_type: cloud-service\n      type: runs-in\n  pack: hosting@0.1.0\n---\n**Why:** a provider nothing runs in is an unused account.\n\n**Fix:** add `runs-in` from the services it provides.\n"
    ],
    [
      "hst--rule-service-details",
      "---\nid: hst--rule-service-details\ntype: rule\ntitle: Services realise a design node\nfields:\n  name: Services realise a design node\n  statement: Every cloud service details a design node\n  severity: warn\n  applies_to:\n    type: cloud-service\n  check:\n    require_link:\n      min: 1\n      type: details\n  pack: hosting@0.1.0\n---\n**Why:** a service that realises nothing in the design is unexplained cost.\n\n**Fix:** add a `details` link to the datastore, queue or component it realises.\n"
    ],
    [
      "hst--rule-service-provider",
      "---\nid: hst--rule-service-provider\ntype: rule\ntitle: Services have a provider\nfields:\n  name: Services have a provider\n  statement: Every cloud service runs in exactly one provider\n  severity: warn\n  applies_to:\n    type: cloud-service\n  check:\n    require_link:\n      max: 1\n      min: 1\n      node_type: cloud-provider\n      type: runs-in\n  pack: hosting@0.1.0\n---\n**Why:** a product has to come from somewhere, and the provider decides where the data lives.\n\n**Fix:** add a `runs-in` link to a cloud provider.\n"
    ],
    [
      "hst--rule-service-region",
      "---\nid: hst--rule-service-region\ntype: rule\ntitle: Services name a region\nfields:\n  name: Services name a region\n  statement: Every cloud service says which region it runs in\n  severity: warn\n  applies_to:\n    type: cloud-service\n  check:\n    require_fields:\n    - region\n  pack: hosting@0.1.0\n---\n**Why:** the region decides where data lives, which is often a legal constraint.\n\n**Fix:** set region.\n"
    ],
    [
      "hst--type-cloud-provider",
      "---\nid: hst--type-cloud-provider\ntype: type\ntitle: cloud-provider\nfields:\n  name: cloud-provider\n  plane: hst--hosting\n  description: 'Use for the company or platform that provides the infrastructure: a public cloud, a private\n    data centre or a SaaS vendor. Link it to the environment it hosts with details.'\n  shape: cloud\n  fields:\n  - name: kind\n    kind: choice\n    required: true\n    values:\n    - public-cloud\n    - private-cloud\n    - on-premises\n    - saas\n  - name: account\n    kind: text\n    label: Account or subscription\n  pack: hosting@0.1.0\n---\n**Ask:** Who provides the infrastructure for this environment? Is there one account or several?\n\nA provider is a vendor, not a product. The products it sells are cloud services. Link it to the environment it hosts with `details`.\n\n**Watch:** a provider nothing runs in.\n"
    ],
    [
      "hst--type-cloud-service",
      "---\nid: hst--type-cloud-service\ntype: type\ntitle: cloud-service\nfields:\n  name: cloud-service\n  plane: hst--hosting\n  description: 'Use for one product from a provider that realises part of the design: a managed database,\n    a container platform, a queue or an object store. Link it to the design node it realises with details.'\n  shape: hexagon 2d\n  fields:\n  - name: service\n    kind: text\n    label: Product name\n    required: true\n  - name: kind\n    kind: choice\n    required: true\n    values:\n    - compute\n    - database\n    - storage\n    - queue\n    - network\n    - identity\n    - observability\n    - other\n  - name: region\n    kind: text\n  pack: hosting@0.1.0\n---\n**Ask:** Which product from the provider realises this datastore, queue or component? In which region?\n\nSay what the product is (for example RDS for PostgreSQL) and put it in the provider with `runs-in`. Link it to the design node it realises with `details`, so removing this pack leaves the design intact. Vendor tuning (instance sizes, settings) belongs in an infrastructure repository, not here.\n\n**Watch:** a service that realises nothing in the design, or one with no region when data residency matters.\n"
    ],
    [
      "examples/ops-api-hosting/acceptance-criterion-status-shown",
      "---\nid: acceptance-criterion-status-shown\ntype: acceptance-criterion\ntitle: Status shown\nplane: def--requirements\nfields:\n  given: A job has just changed state\n  when: Operations staff open the job list\n  then: The new state is shown within 60 seconds\n  method: test\n---\n"
    ],
    [
      "examples/ops-api-hosting/actor-ops-staff",
      "---\nid: actor-ops-staff\ntype: actor\ntitle: Operations staff\nplane: def--capabilities\nlinks:\n- type: uses\n  to: component-ops-api\n---\n"
    ],
    [
      "examples/ops-api-hosting/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 team\n  state: open\n---\n"
    ],
    [
      "examples/ops-api-hosting/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: derives-from\n  to: goal-timely-visibility\n- type: performed-by\n  to: actor-ops-staff\n- type: refers-to\n  to: concept-job\n- type: relies-on\n  to: assumption-job-volume\n---\n"
    ],
    [
      "examples/ops-api-hosting/cloud-provider-aws",
      "---\nid: cloud-provider-aws\ntype: cloud-provider\ntitle: AWS\nplane: hst--hosting\nfields:\n  kind: public-cloud\n  account: ops-production\nlinks:\n- type: details\n  to: environment-production\n---\nThe account that hosts production.\n"
    ],
    [
      "examples/ops-api-hosting/cloud-service-fargate",
      "---\nid: cloud-service-fargate\ntype: cloud-service\ntitle: ECS Fargate\nplane: hst--hosting\nfields:\n  service: ECS Fargate\n  kind: compute\n  region: eu-west-2\nlinks:\n- type: runs-in\n  to: cloud-provider-aws\n- type: details\n  to: component-ops-api\n- type: details\n  to: component-ops-report\n---\nRuns the API service and the nightly report job.\n"
    ],
    [
      "examples/ops-api-hosting/cloud-service-rds",
      "---\nid: cloud-service-rds\ntype: cloud-service\ntitle: RDS for PostgreSQL\nplane: hst--hosting\nfields:\n  service: RDS for PostgreSQL\n  kind: database\n  region: eu-west-2\nlinks:\n- type: runs-in\n  to: cloud-provider-aws\n- type: details\n  to: datastore-ops-db\n---\nManaged database that holds the operations data.\n"
    ],
    [
      "examples/ops-api-hosting/component-ops-api",
      "---\nid: component-ops-api\ntype: component\ntitle: Ops API service\nplane: dsn--design\nfields:\n  kind: service\n  owner: Platform team\n  status: planned\nlinks:\n- type: exposes\n  to: interface-ops-api\n- type: writes\n  to: datastore-ops-db\n- type: publishes\n  to: queue-job-events\n- type: runs-in\n  to: environment-production\n- type: satisfies\n  to: requirement-status-freshness\n---\nServes job status to operations staff and records state changes.\n"
    ],
    [
      "examples/ops-api-hosting/component-ops-report",
      "---\nid: component-ops-report\ntype: component\ntitle: Nightly report job\nplane: dsn--design\nfields:\n  kind: job\n  owner: Platform team\n  status: planned\nlinks:\n- type: subscribes\n  to: queue-job-events\n- type: reads\n  to: datastore-ops-db\n- type: runs-in\n  to: environment-production\n- type: satisfies\n  to: requirement-status-freshness\n---\nBuilds the overnight summary from the recorded events.\n"
    ],
    [
      "examples/ops-api-hosting/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-hosting/consequence-one-engine",
      "---\nid: consequence-one-engine\ntype: consequence\ntitle: Vertical scaling\nplane: gov--decisions\nfields:\n  effect: negative\n---\nThe database scales up before it scales out, so growth in jobs costs more.\n"
    ],
    [
      "examples/ops-api-hosting/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-hosting/convention-short-titles",
      "---\nid: convention-short-titles\ntype: convention\ntitle: Short titles\nplane: abt--about\nlinks:\n- type: describes\n  to: overview\n---\nKeep a title to a short label and put the long text in the description.\n"
    ],
    [
      "examples/ops-api-hosting/datastore-ops-db",
      "---\nid: datastore-ops-db\ntype: datastore\ntitle: Operations database\nplane: dsn--design\nfields:\n  kind: relational\n  owner: Platform team\n---\nHolds every job and its latest status.\n"
    ],
    [
      "examples/ops-api-hosting/decision-option-document-store",
      "---\nid: decision-option-document-store\ntype: decision-option\ntitle: Managed document store\nplane: gov--decisions\nfields:\n  chosen: false\n  summary: Documents, managed\n---\nScales out easily but the reports would need joins in code.\n"
    ],
    [
      "examples/ops-api-hosting/decision-option-managed-postgres",
      "---\nid: decision-option-managed-postgres\ntype: decision-option\ntitle: Managed PostgreSQL\nplane: gov--decisions\nfields:\n  chosen: true\n  summary: Relational, managed\n---\nJoins and constraints come for free; scaling is mostly vertical.\n"
    ],
    [
      "examples/ops-api-hosting/decision-use-postgres",
      "---\nid: decision-use-postgres\ntype: decision\ntitle: Database choice\nplane: gov--decisions\nfields:\n  status: accepted\n  accepted-by: Mat\n  accepted-on: '2026-11-03'\n  review-by: '2027-05-01'\nlinks:\n- type: considers\n  to: decision-option-managed-postgres\n- type: considers\n  to: decision-option-document-store\n- type: has-consequence\n  to: consequence-one-engine\n- type: governs\n  to: datastore-ops-db\n- type: derives-from\n  to: requirement-status-freshness\n- type: complies-with\n  to: principle-prefer-managed\n- type: relies-on\n  to: assumption-job-volume\n---\nUse a managed relational database. Job data is highly structured and the reports need joins.\n"
    ],
    [
      "examples/ops-api-hosting/environment-production",
      "---\nid: environment-production\ntype: environment\ntitle: Production\nplane: dsn--design\nfields:\n  kind: production\n---\nThe live system that operations staff use.\n"
    ],
    [
      "examples/ops-api-hosting/example",
      "---\nid: example\ntype: example\ntitle: The ops API on AWS\nfields:\n  title: The ops API on AWS\n  description: The operations database on RDS and the services on Fargate, both in an AWS account that\n    hosts production, attached to the design with details.\n  use: starter\n  requires:\n  - hosting\n  - core\n---\n"
    ],
    [
      "examples/ops-api-hosting/goal-timely-visibility",
      "---\nid: goal-timely-visibility\ntype: goal\ntitle: Timely 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-hosting/increment-live-status",
      "---\nid: increment-live-status\ntype: increment\ntitle: Live job status\nplane: pln--plan\nfields:\n  status: planned\nlinks:\n- type: enables\n  to: capability-view-job-status\n---\nThe first slice: staff can see live job status.\n"
    ],
    [
      "examples/ops-api-hosting/interface-ops-api",
      "---\nid: interface-ops-api\ntype: interface\ntitle: Ops API\nplane: dsn--design\nfields:\n  protocol: http\n---\nThe boundary operations tools call to read job status.\n"
    ],
    [
      "examples/ops-api-hosting/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-hosting/overview",
      "---\nid: overview\ntype: overview\ntitle: Ops API\nplane: abt--about\nfields:\n  purpose: A status API so operations staff can see what every job is doing.\n  audience: The build team and operations staff\n  owner: Platform team\n  stage: design\nlinks:\n- type: starts-at\n  to: goal-timely-visibility\n---\n"
    ],
    [
      "examples/ops-api-hosting/principle-prefer-managed",
      "---\nid: principle-prefer-managed\ntype: principle\ntitle: Prefer managed services\nplane: gov--decisions\nfields:\n  statement: Prefer managed services over running our own.\n  status: accepted\n  accepted-by: Mat\n  accepted-on: '2026-11-03'\n---\nWe would rather pay for a managed service than operate one ourselves.\n"
    ],
    [
      "examples/ops-api-hosting/question-report-recipients",
      "---\nid: question-report-recipients\ntype: question\ntitle: Report recipients\nplane: def--intent\nfields:\n  state: open\n  raised-by: agent\nlinks:\n- type: about\n  to: capability-view-job-status\n---\nWho should receive the nightly report, and should it also be emailed?\n"
    ],
    [
      "examples/ops-api-hosting/queue-job-events",
      "---\nid: queue-job-events\ntype: queue\ntitle: Job events\nplane: dsn--design\nfields:\n  kind: queue\n  delivery: at-least-once\n---\nAnnounces each job state change so other parts can react.\n"
    ],
    [
      "examples/ops-api-hosting/requirement-status-freshness",
      "---\nid: requirement-status-freshness\ntype: requirement\ntitle: Status is fresh\nplane: def--requirements\nfields:\n  statement: The system shall show each job status no more than 60 seconds old.\n  kind: functional\n  priority: must\n  status: accepted\n  accepted-by: Mat\n  accepted-on: '2026-11-03'\nlinks:\n- type: derives-from\n  to: capability-view-job-status\n- type: verified-by\n  to: acceptance-criterion-status-shown\n---\n"
    ],
    [
      "examples/ops-api-hosting/risk-job-volume-growth",
      "---\nid: risk-job-volume-growth\ntype: risk\ntitle: Job volume growth\nplane: pln--plan\nfields:\n  likelihood: medium\n  impact: high\n  mitigation: Recount nightly jobs every month\n  state: open\nlinks:\n- type: owned-by\n  to: team-platform\n- type: about\n  to: assumption-job-volume\n- type: arises-from\n  to: assumption-job-volume\n---\nIf job volume grows past the assumption, the database may need a bigger plan.\n"
    ],
    [
      "examples/ops-api-hosting/team-build-agent",
      "---\nid: team-build-agent\ntype: team\ntitle: Build agent\nplane: pln--plan\nfields:\n  kind: agent\n  focus: Implements work packages for review\n---\nAn AI agent that writes code and hands it to people to review.\n"
    ],
    [
      "examples/ops-api-hosting/team-platform",
      "---\nid: team-platform\ntype: team\ntitle: Platform team\nplane: pln--plan\nfields:\n  kind: human\n  focus: Builds and runs the platform\n---\nThe people who own the system.\n"
    ],
    [
      "examples/ops-api-hosting/work-package-report-job",
      "---\nid: work-package-report-job\ntype: work-package\ntitle: Report job and database\nplane: pln--plan\nfields:\n  status: planned\nlinks:\n- type: owned-by\n  to: team-platform\n- type: delivers\n  to: component-ops-report\n- type: delivers\n  to: datastore-ops-db\n- type: part-of\n  to: increment-live-status\n---\nBuild the database and the nightly job that reads it.\n"
    ],
    [
      "examples/ops-api-hosting/work-package-status-api",
      "---\nid: work-package-status-api\ntype: work-package\ntitle: Status API\nplane: pln--plan\nfields:\n  status: planned\nlinks:\n- type: owned-by\n  to: team-build-agent\n- type: reviewed-by\n  to: team-platform\n- type: delivers\n  to: component-ops-api\n- type: delivers\n  to: interface-ops-api\n- type: part-of\n  to: increment-live-status\n---\nBuild the service that serves job status.\n"
    ]
  ]
}
