You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move Wright's OPY frontend from purely corpus-reactive compatibility toward a contract-first, evidence-prioritized compatibility baseline.
Wright should proactively implement high-leverage/common OverPy language and metadata surfaces when the upstream semantics are discoverable and reference-testable, while continuing to use real consumers/corpus evidence to prioritize sequencing, validate value, and avoid spending disproportionate effort on legacy/rare quirks.
Context
M11/#82 correctly stopped open-ended reference-output parity work and established semantic compatibility as the governing criterion. Its closing planning note, however, is intentionally conservative: future compatibility work was to be created only when real corpus/tooling evidence demonstrated a blocker.
The first real wrightkit/agent-lab integration (#102/#103/#104/#105) now shows the downside of applying that rule too literally: some predictable, generic compatibility surfaces are discovered serially only after consumers fall back.
OverPy itself exposes substantial structured language/content metadata rather than hiding all compatibility semantics inside compiler control flow. The upstream source contains large centralized data surfaces for actions, values, constants, custom-game settings, heroes/maps, plus OPY-specific metadata for functions, member functions, keywords, modules, preprocessing, annotations, and related constructs. This makes at least part of the compatibility surface suitable for systematic inventory/generation instead of one-symbol-at-a-time fixes.
Wright's compatibility implementation is expected to read and study upstream OverPy source code and later OSTW source code where necessary. Reimplementing compatible language semantics without inspecting the reference implementation is neither required nor desirable. The project should keep this transparent through one centralized upstream-reference document rather than scattering source/provenance notes through every implementation issue or compatibility entry.
This issue refines future planning; it does not retroactively change M11's historical acceptance decision.
Compatibility strategy
Use a hybrid model:
A. Proactive baseline: grammar and semantic primitives
Inventory and proactively support mainstream structural constructs whose semantics are stable, compositional, and high fan-out across real code, for example:
expression/postfix/member/call structure;
assignment/control-flow forms;
declarations and rule directives;
common preprocessing/include/macro forms;
modules/enums/member functions as language categories;
source identity and diagnostics required for tooling.
The unit of work should normally be a semantic/grammar category, not a single encountered spelling.
B. Proactive baseline: structured builtin/catalog surface
Where upstream/reference metadata is structured, prefer a reproducible catalog/import/generation path over manually maintaining a tiny corpus-only table.
Candidate surfaces include:
builtin functions/actions/values;
member-function metadata;
builtin enums/constants;
modules/annotations;
Workshop settings/content identities where they belong to language compatibility rather than dynamic Workshop content tracking.
Wright may inspect and reuse/reference upstream definitions as needed to implement compatibility. Prefer a Wright-owned normalized representation or generated manifest that fits Wright's semantic architecture and can be reference-validated, rather than preserving upstream implementation structure for its own sake.
C. Evidence-prioritized advanced features
Implement more complex language features proactively when they have clear tooling value or broad expected use, but let corpus/consumer evidence determine ordering. Examples may include named arguments, richer settings expressions, advanced preprocessing, decompiler-related source constructs, and optimizer-sensitive semantics.
D. Demand-driven legacy/quirk compatibility
Keep rare historical quirks, upstream bugs, obsolete aliases, scripting hooks, and implementation-specific behavior demand-driven unless they become necessary for the declared compatibility target.
Compatibility mode may preserve observable upstream quirks when required; strict/fixed behavior remains a separate semantic decision.
Upstream/reference inventory
Pin the upstream OverPy version/reference identity used for the baseline (initially align with Wright's existing pinned compatibility oracle unless deliberately upgraded).
Inventory the upstream language surface by category, including grammar, directives, builtins, member functions, enums/constants, modules, settings behavior, and known special cases.
For each category, classify it as:
baseline-supported;
baseline-planned;
evidence-prioritized;
legacy-quirk/demand-driven;
reference-limited/inconclusive.
Keep observable semantic compatibility, not generated Workshop text identity, as the correctness criterion.
Centralized upstream-reference documentation
Maintain one repository document (for example docs/compatibility/upstream-references.md) covering upstream implementations Wright studies or derives compatibility knowledge from.
For each upstream project, record only durable project-level facts such as:
project/repository identity;
license;
pinned/reference version or commit policy;
which Wright compatibility surfaces use it as a reference/oracle;
the distinction between reference semantics and Wright-owned implementation architecture;
any important compatibility limitations or intentional divergences.
Do not require per-symbol or per-file provenance annotations throughout the codebase when the upstream relationship is already covered by this document. Extend the same document for OSTW when M13 begins.
Machine-readable compatibility contract
Where practical, make the support inventory machine-readable so documentation, differential tests, agents, and future release metadata can consume the same declared boundary.
The contract should distinguish at least:
syntax accepted/rejected;
semantic resolution support;
standalone compilation support;
analysis/tooling support;
reference/oracle coverage;
intentional limitations/quirks.
Avoid claiming a construct is supported merely because it parses.
Validation model
Continue using real-world corpus and consumers as regression/priority evidence.
Add systematic reference/differential cases for proactively implemented categories.
Prefer generated table tests for large data-driven surfaces rather than hand-authoring one fixture per symbol when the semantics are uniform.
Use focused real-project fixtures to prove that generated/systematic coverage actually composes through the frontend and tooling pipeline.
Relationship to tooling-first direction
This does not make Wright language-first.
Compiler-grade semantic frontends are enabling infrastructure for check, lint, analyze, inspect, source editing, agents, CI, and interoperability. Proactive compatibility work is justified when it reduces predictable fallback and expands the semantic surface those tools can operate on.
M12/#89 remains the active product-value milestone. Baseline compatibility work may proceed in parallel and becomes M12-critical only when a concrete tooling/consumer blocker requires it.
Non-goals
Byte-for-byte or formatting parity with OverPy output.
Reimplementing OverPy's internal compiler architecture for its own sake.
Pretending Wright's compatible implementation must be developed without reading upstream source.
Per-symbol/per-file provenance bureaucracy when project-level upstream attribution is sufficient.
Declaring every historical OverPy bug/quirk part of the default language semantics.
Wright-only OPY syntax or language evolution.
Completing every compatibility category inside this single issue.
Blocking M12 until the full baseline is implemented.
Deliverables
A pinned upstream/reference surface inventory.
A documented tiered compatibility policy (baseline vs evidence-prioritized vs legacy/quirk).
One centralized upstream-reference document covering OverPy now and extensible to OSTW later.
A machine-readable support/compatibility manifest or an explicit decision why a smaller representation is preferable.
A prioritized set of implementation child issues grouped by semantic category rather than isolated encountered symbols.
A plan for systematic builtin/enum/member metadata ingestion or generation.
Differential/regression strategy for the proactive baseline.
Acceptance criteria
Wright has an explicit forward-looking OPY compatibility baseline that is broader than the current accidental corpus subset but remains bounded by semantic/product value.
The upstream language surface has been inventoried by category against a pinned reference identity.
Common structural grammar/semantic categories are not intentionally left to one-bug-at-a-time discovery when their contract can be implemented/tested systematically.
Large structured builtin/catalog surfaces have an explicit systematic strategy rather than indefinite manual enumeration.
Wright's use of upstream OverPy implementation as a compatibility reference is documented centrally rather than treated as something to avoid or repeatedly justify.
Real consumer/corpus evidence determines priority and confidence, not whether predictable baseline categories are allowed to exist.
Legacy quirks and rare advanced behavior remain explicitly separable from mainstream compatibility.
Goal
Move Wright's OPY frontend from purely corpus-reactive compatibility toward a contract-first, evidence-prioritized compatibility baseline.
Wright should proactively implement high-leverage/common OverPy language and metadata surfaces when the upstream semantics are discoverable and reference-testable, while continuing to use real consumers/corpus evidence to prioritize sequencing, validate value, and avoid spending disproportionate effort on legacy/rare quirks.
Context
M11/#82 correctly stopped open-ended reference-output parity work and established semantic compatibility as the governing criterion. Its closing planning note, however, is intentionally conservative: future compatibility work was to be created only when real corpus/tooling evidence demonstrated a blocker.
The first real
wrightkit/agent-labintegration (#102/#103/#104/#105) now shows the downside of applying that rule too literally: some predictable, generic compatibility surfaces are discovered serially only after consumers fall back.OverPy itself exposes substantial structured language/content metadata rather than hiding all compatibility semantics inside compiler control flow. The upstream source contains large centralized data surfaces for actions, values, constants, custom-game settings, heroes/maps, plus OPY-specific metadata for functions, member functions, keywords, modules, preprocessing, annotations, and related constructs. This makes at least part of the compatibility surface suitable for systematic inventory/generation instead of one-symbol-at-a-time fixes.
Wright's compatibility implementation is expected to read and study upstream OverPy source code and later OSTW source code where necessary. Reimplementing compatible language semantics without inspecting the reference implementation is neither required nor desirable. The project should keep this transparent through one centralized upstream-reference document rather than scattering source/provenance notes through every implementation issue or compatibility entry.
This issue refines future planning; it does not retroactively change M11's historical acceptance decision.
Compatibility strategy
Use a hybrid model:
A. Proactive baseline: grammar and semantic primitives
Inventory and proactively support mainstream structural constructs whose semantics are stable, compositional, and high fan-out across real code, for example:
The unit of work should normally be a semantic/grammar category, not a single encountered spelling.
B. Proactive baseline: structured builtin/catalog surface
Where upstream/reference metadata is structured, prefer a reproducible catalog/import/generation path over manually maintaining a tiny corpus-only table.
Candidate surfaces include:
Wright may inspect and reuse/reference upstream definitions as needed to implement compatibility. Prefer a Wright-owned normalized representation or generated manifest that fits Wright's semantic architecture and can be reference-validated, rather than preserving upstream implementation structure for its own sake.
C. Evidence-prioritized advanced features
Implement more complex language features proactively when they have clear tooling value or broad expected use, but let corpus/consumer evidence determine ordering. Examples may include named arguments, richer settings expressions, advanced preprocessing, decompiler-related source constructs, and optimizer-sensitive semantics.
D. Demand-driven legacy/quirk compatibility
Keep rare historical quirks, upstream bugs, obsolete aliases, scripting hooks, and implementation-specific behavior demand-driven unless they become necessary for the declared compatibility target.
Compatibility mode may preserve observable upstream quirks when required; strict/fixed behavior remains a separate semantic decision.
Upstream/reference inventory
baseline-supported;baseline-planned;evidence-prioritized;legacy-quirk/demand-driven;reference-limited/inconclusive.Centralized upstream-reference documentation
Maintain one repository document (for example
docs/compatibility/upstream-references.md) covering upstream implementations Wright studies or derives compatibility knowledge from.For each upstream project, record only durable project-level facts such as:
Do not require per-symbol or per-file provenance annotations throughout the codebase when the upstream relationship is already covered by this document. Extend the same document for OSTW when M13 begins.
Machine-readable compatibility contract
Where practical, make the support inventory machine-readable so documentation, differential tests, agents, and future release metadata can consume the same declared boundary.
The contract should distinguish at least:
Avoid claiming a construct is supported merely because it parses.
Validation model
Relationship to tooling-first direction
This does not make Wright language-first.
Compiler-grade semantic frontends are enabling infrastructure for
check,lint,analyze,inspect, source editing, agents, CI, and interoperability. Proactive compatibility work is justified when it reduces predictable fallback and expands the semantic surface those tools can operate on.M12/#89 remains the active product-value milestone. Baseline compatibility work may proceed in parallel and becomes M12-critical only when a concrete tooling/consumer blocker requires it.
Non-goals
Deliverables
Acceptance criteria
Relationships
eventPlayer.setMoveSpeedand peers) #104 is an example of a baseline structural/member-call correctness gap.ChaseTimeReeval.NONEand nearby real-world gaps #105 is an example where a systematic builtin/enum catalog strategy may be preferable to serial one-member fixes.