Parent: #7
Goal
Finish the source-language directive and preprocessing behavior that opy-rs can own before Workshop lowering, while keeping target-specific effects explicitly deferred.
Context
The support matrix still has planned coverage for advanced preprocessing directives, translations, and optimization controls. Some of these have frontend-visible semantics that belong in opy-rs; their Workshop emission/optimizer/localization effects do not.
Scope
- Implement
#!mainFile and #!allowMacroRedeclaration behavior where supported by the pinned reference.
- Implement inventory-backed
#!rulePrefix* behavior and other preprocessing-state directives that affect OPY source interpretation before lowering.
- Recognize, validate, preserve provenance for, and expose semantic state for
#!translations without duplicating Workshop locale/catalog data.
- Recognize, validate, and track the
#!optimize* / #!replace0By* family and related compression controls as frontend directive state when their backend effects cannot yet execute.
- Complete evidence-backed rule annotation forms currently outside the declared subset (
@Team/@Slot arguments, @Name, @Hero, @Disabled, @Delimiter, @NewPage, @SuppressWarnings) where these are source-language semantics rather than Workshop catalog content.
- Split mixed support-matrix rows where necessary so frontend recognition/state and Workshop-dependent backend effects are not represented by one ambiguous status.
- Add positive/negative fixtures and oracle probes for directive scope, duplicate/redeclaration behavior, malformed forms, and cross-file interactions.
Non-goals
- Implementing Workshop optimizer transformations merely to match upstream output form.
- Localized Workshop emission or locale catalog ownership.
- Adding Workshop settings/content tables.
- Starting OPY→Workshop lowering.
Acceptance criteria
- All advanced directive/preprocessing behavior that is observable before Workshop lowering is parsed, validated, and represented with corpus/probe evidence.
- Backend-only optimization/localization/emission effects remain explicitly
lowering-dependent rather than being approximated.
- Support-matrix rows no longer conflate frontend directive support with backend execution semantics.
- Unsupported/reference-rejected directive forms fail with structured diagnostics and source provenance.
- Existing preprocessing, macro/runtime, tooling, and differential tests remain green.
- No Workshop catalog/locale data or
workshop-rs dependency is introduced.
Parent: #7
Goal
Finish the source-language directive and preprocessing behavior that
opy-rscan own before Workshop lowering, while keeping target-specific effects explicitly deferred.Context
The support matrix still has
plannedcoverage for advanced preprocessing directives, translations, and optimization controls. Some of these have frontend-visible semantics that belong inopy-rs; their Workshop emission/optimizer/localization effects do not.Scope
#!mainFileand#!allowMacroRedeclarationbehavior where supported by the pinned reference.#!rulePrefix*behavior and other preprocessing-state directives that affect OPY source interpretation before lowering.#!translationswithout duplicating Workshop locale/catalog data.#!optimize*/#!replace0By*family and related compression controls as frontend directive state when their backend effects cannot yet execute.@Team/@Slotarguments,@Name,@Hero,@Disabled,@Delimiter,@NewPage,@SuppressWarnings) where these are source-language semantics rather than Workshop catalog content.Non-goals
Acceptance criteria
lowering-dependentrather than being approximated.workshop-rsdependency is introduced.