Context and modules
Use the L3 frame scope and distinguish read tools from executable script capabilities.
L3 receives the shared strategy frame scope plus its advanced capabilities. Keep each capability's purpose clear before wiring it into a decision.
Shared frame capabilities
Like SJS, L3 can receive context, bar, log, cal, configured-algorithm access through context, and injected decision helpers. It also receives skip functions used by the shared runner.
context is the running session. It can expose execution methods as well as state. Treat a script that calls them as action-producing code; the presence of observation tools does not make all L3 source read-only.
L3 additions
| Capability | Purpose |
|---|---|
modules.policies | Policy state, frame evaluation, intent checks, resolution, and execution |
| Frame/market-brief modules | Build supported structured evidence from engine context |
modules.attentionPacks | Available attention-pack utilities |
modules.sharedPolicies | Runtime-provided reusable policy modules |
tools | Supported session, market-data, risk, state, and helper operations |
gates | Helpers for intent classification, directives, and automation checks |
provider.provider.complete(...) | Call the selected L3 provider adapter |
The nested provider call is intentional: the injected provider contains the provider instance. A configured provider does not call itself automatically.
Tool evidence is not uniformly live
Some tool evidence is captured when the frame scope is built. Other operations, such as historical data or live account reads, query their own sources. Do not assume every tool result is a simultaneous snapshot.
Inspect timestamps, coverage, and source metadata when combining results. get_l3_state reads current L3 state, while set_l3_state merges supplied top-level fields; neither is a durable database contract for your strategy.
Keep module access in the right layer
Ordinary SJS/L2 scope does not currently inject modules.policies. Use policies from the L3 source field and keep the main strategy in SJS. Shared helper functions such as pureSides are a different capability from policy objects.
Continue with working with SJS.