# configuration/constants/grammar.constants.ts

> 85 lines of code and 75 definitions.

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

Listed in [configuration/constants](https://banes-lab.com/api/source/context/configuration/constants.md), after [configuration/constants/field.constants.ts](https://banes-lab.com/source/context/configuration/constants/field.constants.ts.md) and before [configuration/constants/identifier.constants.ts](https://banes-lab.com/source/context/configuration/constants/identifier.constants.ts.md).

## Definitions

- `GATE_MIN_CONDITIONS` (lexical_declaration, line 1, exported)
- `GATE_MAX_CONDITIONS` (lexical_declaration, line 3, exported)
- `HEADER_PREFIX` (lexical_declaration, line 5, exported)
- `NODE_HEAD` (lexical_declaration, line 7, exported)
- `RETIRED_UNIT_HEADS` (lexical_declaration, line 9, exported)
- `DECLARATION_PREFIX` (lexical_declaration, line 11, exported)
- `META_MARKER` (lexical_declaration, line 13, exported)
- `FRONTMATTER_FENCE` (lexical_declaration, line 15, exported)
- `GATE_MARKER` (lexical_declaration, line 17, exported)
- `RETIRED_GATE_MARKERS` (lexical_declaration, line 19, exported)
- `CHECK_MARKERS` (lexical_declaration, line 21, exported)
- `RETIRED_CHECK_MARKERS` (lexical_declaration, line 23, exported)
- `EVIDENCE_OPEN` (lexical_declaration, line 25, exported)
- `POPULATION_MARKER` (lexical_declaration, line 27, exported)
- `MEASURED_MARKER` (lexical_declaration, line 29, exported)
- `REFUSAL_PREFIX` (lexical_declaration, line 31, exported)
- `STANDING_PREFIX` (lexical_declaration, line 33, exported)
- `RESULT_PREFIX` (lexical_declaration, line 35, exported)
- `RESULT_ARROWS` (lexical_declaration, line 37, exported)
- `RESULT_PASS` (lexical_declaration, line 39, exported)
- `RESULT_REPAIR` (lexical_declaration, line 41, exported)
- `RESULT_OWNER_OPEN` (lexical_declaration, line 43, exported)
- `RESULT_UNKNOWN` (lexical_declaration, line 45, exported)
- `RESULT_BLOCKED` (lexical_declaration, line 47, exported)
- `INVARIANT_BLOCK_HEAD` (lexical_declaration, line 49, exported)
- `INVARIANT_PREFIX` (lexical_declaration, line 51, exported)
- `INVARIANT_SET` (lexical_declaration, line 53, exported)
- `INVARIANT_PARTIES` (lexical_declaration, line 55, exported)
- `INVARIANT_OBJECTOR` (lexical_declaration, line 57, exported)
- `BARE_INVARIANT_HEADS` (lexical_declaration, line 59, exported)
- `REPORT_HEAD` (lexical_declaration, line 61, exported)
- `CONTRACT_HEAD` (lexical_declaration, line 63, exported)
- `CONTRACT_INPUT` (lexical_declaration, line 65, exported)
- `CONTRACT_TRANSFORM` (lexical_declaration, line 67, exported)
- `CONTRACT_FRESHNESS` (lexical_declaration, line 69, exported)
- `TAG_PURPOSE` (lexical_declaration, line 71, exported)
- `TAG_CUE` (lexical_declaration, line 73, exported)
- `TAG_GENESIS` (lexical_declaration, line 75, exported)
- `TAG_OPEN` (lexical_declaration, line 77, exported)
- `TAG_CLOSE` (lexical_declaration, line 79, exported)
- `TAG_SEPARATOR` (lexical_declaration, line 81, exported)
- `TAG_YIELDS` (lexical_declaration, line 83, exported)
- `NODE_TAG_SLOTS` (lexical_declaration, line 85, exported)
- `ARTIFACT_SHAPE` (lexical_declaration, line 87, exported)
- `WRITING_TOKENS` (lexical_declaration, line 89, exported)
- `SOURCE_TOKENS` (lexical_declaration, line 91, exported)
- `EM_DASH` (lexical_declaration, line 93, exported)
- `REPAIR_EDGE_HEAD` (lexical_declaration, line 95, exported)
- `HEAD_TOKEN_MIN` (lexical_declaration, line 97, exported)
- `DECL_META_TOKENS` (lexical_declaration, line 99, exported)
- `ARM_SEPARATOR` (lexical_declaration, line 101, exported)
- `POPULATION_SLASH` (lexical_declaration, line 103, exported)
- `BULLET` (lexical_declaration, line 105, exported)
- `LOWERCASE_KEYWORDS` (lexical_declaration, line 107, exported)
- `NEEDS_COLON` (lexical_declaration, line 109, exported)
- `FOR_HEAD` (lexical_declaration, line 111, exported)
- `FOR_EACH_HEAD` (lexical_declaration, line 113, exported)
- `VAGUE_TERMS` (lexical_declaration, line 115, exported)
- `DECLARING_PREFIXES` (lexical_declaration, line 127, exported)
- `JURISDICTION_KEY` (lexical_declaration, line 129, exported)
- `NAME_TERMINATORS` (lexical_declaration, line 131, exported)
- `ZERO` (lexical_declaration, line 133, exported)
- `REQUIRED_SECTIONS` (lexical_declaration, line 135, exported)
- `KEYWORDS_FILE` (lexical_declaration, line 137, exported)
- `DOCUMENT_TYPES_FILE` (lexical_declaration, line 139, exported)
- `PRODUCTIONS_FILE` (lexical_declaration, line 141, exported)
- `TEMPLATE_FILE_PREFIX` (lexical_declaration, line 143, exported)
- `TEMPLATES_SOURCE` (lexical_declaration, line 145, exported)
- `TERMINALS_KEY` (lexical_declaration, line 147, exported)
- `DOCUMENT_TYPE_CATEGORY` (lexical_declaration, line 149, exported)
- `DOCUMENT_VERB_CATEGORY` (lexical_declaration, line 151, exported)
- `KEYWORD_SEPARATOR` (lexical_declaration, line 153, exported)
- `NONTERMINAL_CLOSE` (lexical_declaration, line 155, exported)
- `DEFAULT_SLOT_KIND` (lexical_declaration, line 157, exported)
- `PAG_SUBJECT` (lexical_declaration, line 159, exported)

## Contained in

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

## Source

```typescript
export const GATE_MIN_CONDITIONS = 3;

export const GATE_MAX_CONDITIONS = 5;

export const HEADER_PREFIX = "# ";

export const NODE_HEAD = "NODE";

export const RETIRED_UNIT_HEADS = new Set(["PHASE"]);

export const DECLARATION_PREFIX = "THIS ";

export const META_MARKER = "%% META %%";

export const FRONTMATTER_FENCE = "---";

export const GATE_MARKER = "handoff gate";

export const RETIRED_GATE_MARKERS = ["validation gate", "## validation gate", "**validation gate"];

export const CHECK_MARKERS = ["[check]", "ASSERT ", "REQUIRE "];

export const RETIRED_CHECK_MARKERS = ["✅", "ANALYZE ", "[high]", "[medium]", "[low]"];

export const EVIDENCE_OPEN = "(evidence:";

export const POPULATION_MARKER = "over:";

export const MEASURED_MARKER = "measured:";

export const REFUSAL_PREFIX = "refuse:";

export const STANDING_PREFIX = "standing:";

export const RESULT_PREFIX = "result:";

export const RESULT_ARROWS: readonly string[] = ["→", "->"];

export const RESULT_PASS = "pass";

export const RESULT_REPAIR = "REPAIR";

export const RESULT_OWNER_OPEN = "(owner:";

export const RESULT_UNKNOWN = "unknown";

export const RESULT_BLOCKED = "BLOCKED";

export const INVARIANT_BLOCK_HEAD = "CROSS-NODE INVARIANTS";

export const INVARIANT_PREFIX = "INVARIANT ";

export const INVARIANT_SET = "over:";

export const INVARIANT_PARTIES = "binds:";

export const INVARIANT_OBJECTOR = "objector:";

export const BARE_INVARIANT_HEADS = new Set(["ALWAYS:", "NEVER:"]);

export const REPORT_HEAD = "REPORT:";

export const CONTRACT_HEAD = "CONTRACT:";

export const CONTRACT_INPUT = "input:";

export const CONTRACT_TRANSFORM = "transform:";

export const CONTRACT_FRESHNESS = "freshness:";

export const TAG_PURPOSE = "@purpose:";

export const TAG_CUE = "@cue:";

export const TAG_GENESIS = "@genesis:";

export const TAG_OPEN = "[";

export const TAG_CLOSE = "]";

export const TAG_SEPARATOR = "·";

export const TAG_YIELDS = "yields:";

export const NODE_TAG_SLOTS = 4;

export const ARTIFACT_SHAPE = "artifact";

export const WRITING_TOKENS = ["PERSIST_ARTIFACT", "EXECUTE_TOOL", "WRITE ", "DELETE ", "MOVE "];

export const SOURCE_TOKENS = ["NODE ", "{", "<"];

export const EM_DASH = "—";

export const REPAIR_EDGE_HEAD = "REPAIR EDGE";

export const HEAD_TOKEN_MIN = 2;

export const DECL_META_TOKENS = 2;

export const ARM_SEPARATOR = "|";

export const POPULATION_SLASH = "/";

export const BULLET = "- ";

export const LOWERCASE_KEYWORDS = ["if ", "for ", "while ", "set ", "declare ", "when ", "try:", "catch:", "else:"];

export const NEEDS_COLON = ["IF ", "ELSE IF ", "FOR EACH ", "WHILE ", "WHEN "];

export const FOR_HEAD = "FOR ";

export const FOR_EACH_HEAD = "FOR EACH ";

export const VAGUE_TERMS = [
    "looks good",
    "looks valid",
    "looks fine",
    "looks correct",
    "seems ok",
    "is fine",
    "all good",
    "everything works",
    "works fine",
];

export const DECLARING_PREFIXES = ["DECLARE ", "SET "];

export const JURISDICTION_KEY = "jurisdiction";

export const NAME_TERMINATORS = new Set([":", "=", " "]);

export const ZERO = "0";

export const REQUIRED_SECTIONS = ["frontmatter", "declaration", "meta", "nodes", "gates", "invariants", "report"];

export const KEYWORDS_FILE = "keyword.data.json";

export const DOCUMENT_TYPES_FILE = "document.kind.data.json";

export const PRODUCTIONS_FILE = "bnf.data.json";

export const TEMPLATE_FILE_PREFIX = "template.";

export const TEMPLATES_SOURCE = "templates";

export const TERMINALS_KEY = "terminals";

export const DOCUMENT_TYPE_CATEGORY = "document_type";

export const DOCUMENT_VERB_CATEGORY = "document_verb";

export const KEYWORD_SEPARATOR = ":";

export const NONTERMINAL_CLOSE = ">";

export const DEFAULT_SLOT_KIND = "string";

export const PAG_SUBJECT = "pag";
```
