# configuration/schemas/architecture.schema.ts

> 42 lines of code and 3 definitions.

Tree: GovLab Context
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/context#file-context-configuration-schemas-architecture-schema-ts
Source text: https://banes-lab.com/source/context/configuration/schemas/architecture.schema.ts.txt

Listed in [configuration/schemas](https://banes-lab.com/api/source/context/configuration/schemas.md), after [configuration/schemas/algorithm.schema.ts](https://banes-lab.com/source/context/configuration/schemas/algorithm.schema.ts.md) and before [configuration/schemas/grammar.schema.ts](https://banes-lab.com/source/context/configuration/schemas/grammar.schema.ts.md).

## Definitions

- `PRINCIPLE_KIND` (lexical_declaration, line 16, exported)
- `RELATED` (lexical_declaration, line 18)
- `ARCH_SCHEMA` (lexical_declaration, line 20, exported)

## Contained in

- [configuration/schemas](https://banes-lab.com/anatomy/context/folder-context-configuration-schemas.md)

## Source

```typescript
import {
    CLOSED,
    LABEL,
    LABELS,
    OPTIONAL_LABEL,
    OPTIONAL_LABELS,
    OPTIONAL_OBJECT,
    OPTIONAL_RECORDS,
    OPTIONAL_TEXT,
    TEXT,
} from "#configuration/constants/field.constants";
import { REFACTORS_RELATION, VIOLATES_RELATION } from "@govlab/constants";
import { freeRefs, optionalRefs } from "#core/factories/field.factory";
import type { KindSchema } from "#types/field.types";

export const PRINCIPLE_KIND = "principle";

const RELATED = optionalRefs("architecture", "referenced-by");

export const ARCH_SCHEMA: KindSchema = {
    aliases: OPTIONAL_LABELS,
    canon: OPTIONAL_LABELS,
    check: OPTIONAL_OBJECT,
    conflicts_with: RELATED,
    definition: TEXT,
    detected_by: LABELS,
    distinctFrom: OPTIONAL_RECORDS,
    enables: RELATED,
    enforced_by: LABELS,
    exemplar: OPTIONAL_OBJECT,
    expressedBy: OPTIONAL_LABELS,
    formed_by: OPTIONAL_TEXT,
    id: OPTIONAL_LABEL,
    mandatoryFor: OPTIONAL_LABEL,
    measured_by: LABELS,
    name: LABEL,
    refactored_by: freeRefs(REFACTORS_RELATION),
    reinforces: RELATED,
    requires: RELATED,
    scope: LABELS,
    severity: CLOSED,
    tensions_with: RELATED,
    type: LABEL,
    violated_by: freeRefs(VIOLATES_RELATION),
};
```
