How to interpret OrgScript deterministically and without guesswork.
OrgScript is descriptive, not executable.
It describes business logic for parsers, validators, linters, exporters, and AI systems.
Do not treat it as free-form natural language.
- File order matters within blocks.
- Indentation defines containment.
- Top-level block type is semantically significant.
whenandifare distinct constructs.stopterminates the current branch.stateflowdefines legal transitions, not execution order.requireis a named gate, not a comment.
- In a
process,whenis the entry trigger. - In a
policy,whenintroduces a conditional situation for athenblock. whenmust not be collapsed into generic conditional logic.
ifexpresses branch logic inside a block.else ifpreserves branch order.elseis the fallback branch for the immediately precedingif.
requireis a first-class prerequisite node.- Do not reinterpret it as
assign,notify, or prose.
stopends the current branch.- Statements after a guaranteed
stopare unreachable in that branch.
AI must not:
- invent implicit transitions
- merge
whenandif - reinterpret
requireas another action - assume default owners, thresholds, or approvals
- add missing business logic silently
- collapse distinct constructs into generic nodes for convenience
- Preserve block type.
- Preserve statement order.
- Preserve branch order.
- Preserve canonical identifiers.
- Preserve explicit values exactly.
- Normalize formatting only through the formatter, not by semantic rewriting.
Preferred pipeline:
text
-> lexer
-> parser
-> AST
-> semantic validation
-> canonical model
-> downstream transforms
- Parse structure before interpretation.
- Report syntax violations instead of repairing them silently.
- Keep canonical output close to the AST.
- Do not introduce new business semantics during export.
- Translate only what is explicit.
- Flag ambiguity instead of guessing.
- Preserve rule and branch boundaries.
When interpreting OrgScript:
- prefer explicit reading over helpful guessing
- flag missing scope or ambiguous structure
- do not auto-complete business intent
- do not rewrite the meaning of rules
- do not infer legality from names alone
- never guess missing approvals
- never invent owners
- never infer legal transitions from state names alone
- never rewrite business intent into more convenient semantics
- never turn
policy when ... then ...into genericiflogic without preserving block type - never repair invalid input without surfacing the repair
Source:
process QuoteToOrder
when quote.accepted
if order.deposit_received = false then
transition order.status to "awaiting_deposit"
notify finance with "Deposit required before confirmation"
stop
transition order.status to "confirmed"
Deterministic reading:
- block type:
process - trigger:
quote.accepted - first branch condition:
order.deposit_received = false - branch actions:
- transition status to
awaiting_deposit - notify
finance - stop branch
- fallthrough action after the failed branch condition:
- transition status to
confirmed
The AI must not infer:
- an automatic payment retry
- a default owner
- a hidden approval
- a stateflow not explicitly declared elsewhere