Docs menu

Data Array Engine

Govern ordered, deduped arrays with array_enforce and array_plan_normalize.

What you will learn

  • Declare arrays in .ags/data-arrays.yml
  • Enforce order/unique
  • Normalize

Prerequisites

Surface

MCParray_get · array_validate · array_enforce · array_plan_normalize
Config.ags/data-arrays.yml

What this feature does

Arrays like staging-categories and deployment-order must stay unique and ordered. Locators point at TS exports or YAML keys.

Configuration

Wire these surfaces first: .ags/data-arrays.yml.. Treat them as the contract agents must not invent around.

.ags/data-arrays.yml yaml
schemaVersion: 1
arrays:
  - id: deployment-order
    path: .ags/deployment.yml
    locator:
      yamlKey: deploymentOrder
    order: asDeclared
    uniqueBy: "$value"
    itemKind: string
    domain: deployment
graphArtifact: docs/data-array-map/latest.json

How to call it

Call these MCP tools through your AGS / tower-gov host — array_get, array_validate, array_enforce, array_plan_normalize.. Prefer scan/get before validate/diff, and enforce only when the change set is ready.

  1. Declare array
  2. array_validate
  3. array_plan_normalize if dirty
  4. array_enforce
MCP: array_enforce json
{ "arrayId": "deployment-order" }

What success looks like

array_enforce ok

Order matches policy

Common failure modes

Duplicates under uniqueBy

Alpha sort when asDeclared required

Wrong locator → empty read

Related reference

AGS documentation