NaCl BA Rules For Codex
Maintain the BA business-rule catalog in the graph. Rule artifacts remain
Russian by default unless the user explicitly requests another supported output
language.
Read ../nacl-core/SKILL.md, ../references/migration-rules.md,
../references/verification-vocabulary.md, and
../references/ba-codex-contract.md before executing the workflow.
Mandatory Graph Execution Contract
This is a graph writer. Apply the BA graph writer contract before rule writes:
resolve configuration, inspect schema/query references, check graph tooling,
load entities, attributes, workflow steps, process links, roles, existing
rules, and traceability targets, then present candidate rules with source
evidence. If graph tools or source nodes are unavailable, report BLOCKED.
Write only confirmed BusinessRule records and binding relationships. Verify
with ba_rules_catalog-equivalent read-back and rule-specific target checks.
Operating Forms
| Form | Purpose |
|---|---|
| full | Scan graph data, classify candidate rules, trace them, and write a catalog. |
| add | Add one confirmed business rule. |
Rule Types
| Type | Meaning |
|---|---|
| constraint | Restriction on data or process behavior. |
| calculation | Formula or computation rule. |
| invariant | Condition that must always hold. |
| authorization | Permission rule for a business action. |
Workflow
- Pre-check graph data for entities, attributes, workflow decisions, process
conditions, and existing rules.
- For
full, extract candidates from graph context and present them for user
confirmation.
- Classify each confirmed rule and ask the user to approve classification.
- Link rules to constrained entities, attributes, workflow steps, processes, or
roles where graph evidence supports the link.
- Generate
BRQ-NNNIDs and write confirmedBusinessRulenodes and
traceability relationships when graph write tools are available.
- Query the graph to generate the catalog table and coverage notes.
Stop before classification, traceability, and graph writes unless the user has
confirmed the previous output.
The source phase order is mandatory: pre-checks, extraction, classification,
traceability, catalog generation, validation, report.
Rule Constraints
- Rules must have a name, type, formulation, source, and traceability target
where available.
- Do not create duplicate rules with the same formulation and target.
- Candidate extraction can suggest rules, but the user confirms final wording.
- Rules belong in the graph, not in generated project files.
- Relationship semantics are
CONSTRAINS,APPLIES_IN,AFFECTS, and
APPLIES_AT_STEP.
Capabilities
May Do
- Scan graph nodes and relationships for rule candidates.
- Propose rule type and traceability from graph context.
- Ask clarifying questions for ambiguous formulations.
- Write confirmed rule nodes and relationships when graph write tools are
available.
- Generate a rule catalog from graph reads.
Must Not Do
- Invent rules absent from graph evidence or user input.
- Write unconfirmed rule formulations.
- Duplicate existing rules.
- Modify project files.
- Claim catalog completeness without graph read evidence.
Conditional Tools And Actions
- Candidate extraction requires graph read tools.
- Rule writes require graph write tools and explicit confirmation.
- Catalog generation requires graph read tools after writes.
- Single-rule addition requires a user-provided formulation.
Blocked Or Unverified Reporting
- Use
BLOCKEDwhen graph tooling, source nodes, rule formulation, or
confirmation is missing.
- Use
PARTIALLY_VERIFIEDwhen some traceability links cannot be checked. - Use
UNVERIFIEDwhen a proposed rule cannot be checked against graph context. - Use
FAILEDwith a reason when graph read-back contradicts confirmed rule
writes.
Source Comparison
- Source Claude skill path:
../../nacl-ba-rules/SKILL.md
Preserved Methodology
- Graph-sourced business-rule extraction.
- Rule classification and traceability.
BRQ-NNNidentifiers and catalog generation.- User confirmation for formulation, type, and links.
Removed Claude Mechanics
- Non-Codex frontmatter fields.
- Assumed graph tool availability.
- Platform-specific execution wording.
- Unconditional catalog writes.
Codex Replacement Behavior
- Treat reads, writes, and verification as conditional.
- Gate rule creation with explicit confirmation.
- Use closed verification statuses for missing or partial evidence.
- Keep slash command text as compatibility trigger text.