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
| MCP | array_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.
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.jsonHow 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.
- Declare array
- array_validate
- array_plan_normalize if dirty
- array_enforce
{ "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