Shared under NDA. This document may be passed on only with the author's consent. And only under an NDA of equal scope.
Context
RAPID is the shared execution layer for self-directed investors: an open runtime on the member's own machine that turns the member's own rules into the member's own orders. Engines signal, RAPID composes and asks, the member approves, the broker executes.
The law came first. Seven research rounds since July, a counsel opinion in June, and the integrations built and run along the way produced this design. Each constraint is a legal finding turned into a boundary, a default or a missing feature.
This page is the design. What remains after it is in the Legal Position. Read them together.
The invariants: the engine only signals. RAPID composes from the member's local policy. The member decides. Guards can stop anything. Only the member's authorization can send. The ledger never lies. Everything else may change.
Why – the argument for this architecture
Every other auto-trading service tells the member: "we promise not to misuse our access." This one is built so that the access simply doesn't exist. Here's that argument, in five claims:
The access doesn't exist. Structurally. The trade credential lives only in the runtime, on the member's own machine. The hosted engine never holds a trade key and has no path to the broker at all. Compromise an engine and there is still no credential to expose and no way to manufacture execution authority. This is also the shape the SEC staff cleared in 2005: locally installed, user-programmed software that sent the user's own orders to the user's own broker (CommandTRADE / GlobalTec). Open source makes the runtime auditable and buildable by anyone, and that is why we chose it. It is not the legal reason the boundary holds. No securities authority gives weight to the licence; what matters is who holds the key.
The design targets what the research actually weighs. Four things, every time: is the advice personal, is it timed to the market, who holds decision authority, and does the member's own mind step in before the trade. And two facts P7 (5 Sep 2026) showed carry the weight: the member wrote the trigger criteria himself, and the member asked to be told. Signal-only output on its own buys nothing. Authorship and request do. RAPID builds all of it in: the member enters his own portfolio and order policy, engines send signals rather than orders, RAPID composes the order locally, and the member approves each one. One thing does not help, and the design does not lean on it: where the software runs. Local composition changes nothing by itself (Taucher v. Born). Who wrote the values does. Labels, participant caps and disclaimers don't stand in for those facts.
The brain can never create the order, or the authority to send it. (Brain is the engine. Hands are the RAPID runtime.) The engine sends only which rule fired, for which instrument, which side, and when. No quantity, no order type, no price, no time-in-force, no account. RAPID composes those from the member's own local policy. In per-order mode, the member's swipe in the RAPID-owned panel is the authorization. A future standing mode needs its own separate local grant. The engine can never create or enlarge either.
Execution stays inside the member's own terms. Once RAPID has a definite order from the member's policy, a definite security, a definite quantity, good for the day, the runtime may work it only within the price and time latitude the member granted. FINRA calls that latitude investment discretion but exempts it from the recordkeeping rule as long as it stays inside those limits. The envelope is never widened. Pre-trade risk control stays with the member's regulated broker. And in all marketing, onboarding and Product Terms: the member is a customer of his own broker, not of the Company. The Company has no customer relationship to any trade. That is condition 1 of the 1996 Schwab letter, the one primary-source cure the research found for the solicitation problem.
The record proves what was authorized. It doesn't change what the runtime is. The local journal links source, policy version, composed order, the exact terms shown, the member's authorization, adapter and broker response in one append-only chain. That answers what was authorized and by whom. It is evidence, not a legal transformation. The broker's statement is the final truth about execution. The journal stores derived values and the member's own terms only, never vendor prices or price sequences.
Every layer below exists to keep one of these five enforced by the machine, not by policy. The architecture is the current legal position, in running form.
How – the target architecture
RAPID (Rule-Authorized Proposal & Instruction Dispatcher) is the shared execution stack. Independently built engines connect as signal sources through one execution boundary that the member controls, on the member's own machine. The broker stays the member's. So does the authority to trade.
Definition. RAPID is an open-source execution runtime (GPL-3.0-only, never AGPL) that runs on the member's machine. Free, auditable, buildable by the member. It receives signals from authenticated engines, composes each order from the member's own local policy, asks the member for authorization, applies the execution limits, and is the only software allowed to use the member's broker credentials.
Terminology, used consistently below:engine = signal source · RAPID runtime = execution boundary · broker adapter = execution integration · broker = execution venue and account authority. (Brain and hands appear only in Why, as metaphor.)
Release shape – proposed, open for discussion
Two modes. Per-order: a new source starts disabled, the member switches it on locally, and every live order takes one explicit act that RAPID records. Standing: locally enabled execution without a per-order act. Which ships when is an open question.
Figure 1 · The topology – who talks to whom
Sources – heads
YILD hosted brain · signal-only, one among equals
Brian’s engine · independently deployed – own repo, logic, data
Other compatible engine · same signal contract, independently owned
→
RAPID – the member’s machine
The user-controlled execution boundary
Authenticates sources · validates signals · composes the order from the member’s policy · takes the member’s local authorization · dispatches via broker adapters · journals everything.
🔒 Trade-capable credentials live only here – local keychain / isolated vault, inaccessible to every source.
Sources send signals only – rule, instrument, side, time and source identity. They never send quantity, order type, price or time-in-force; they never access the broker credential and never bypass local authorization. External reference lists are fetched by the member’s runtime directly from the publisher and passed to the engine as member configuration, never through Company servers.
Figure 2 · Inside RAPID – one order, top to bottom
1 · Source authentication
Registered identity · version · provenance – an unknown source stops here.
↓
2 · Signal validation & order composition
The signal is validated; RAPID composes quantity, order type, price band, time-in-force and account from the member’s own local policy.
↓
3 · RAPID-owned approval
The member’s yes. The complete order is shown in a RAPID-controlled panel inside the engine experience. Per-order approval: no source ever creates its own authority.
↓
4 · Broker adapter
Capability validation · broker-specific translation – invoked only after local authorization, using the member’s own credentials.
↓
5 · Broker response & reconciliation
Ack, fill, status – reconciled against the journal; the broker’s statement is final truth.
↓
Linked journal – every step above lands here
Source → configuration → authorization → canonical instruction → adapter → broker response, as one append-only, provenance-linked, replay-safe chain.
A layer is done when something ran and proved it. Never by reading the code.
LAYER 1
Engine – the signal source
signals
Contract – the API every new brain integrates against
An engine, hosted by its builder or run on the member's machine, evaluates the member’s rule logic and emits an authenticated signal only: { rule_id, rule_version, instrument, side, fired_at, source_id, source_signature }. It says what fired and when. Never how much, never how to place the order. Quantity, order type, price, price band, re-peg rule, time-in-force and account cannot cross this boundary. Engine-side settings cover universe filtering, trigger points, thresholds, buy/sell logic and trading windows. Sizing, cash management and how an order is built belong to the member’s local RAPID policy. Engines never hold the member’s trade credentials and have no broker code path.
Membership is enforced here, upstream. Not in the runtime. A hosted engine checks the member’s subscription at every delivery. When membership lapses, the signals stop. RAPID has no idea what a membership is; it knows its owner and its paired sources. A runtime with no sources carries nothing, so the open-source runtime gates nothing.
Requirements
R1.1Source messages conform to the published integration contract, carrying registered source identity, version and provenance on every message.
R1.2The signal contract permits rule identity/version, instrument, side, timestamp, source identity and source signature – and rejects order-construction fields such as quantity, order type, price, price band, time-in-force or account.
R1.3No trade credential, no broker imports, no order-transmission path anywhere in the engine – provable by static check.
R1.4Pairing by code: the engine learns only which runtime to address. Connecting an engine never grants execution authority of any kind.
Definition of Done
a sample message validates against the integration contract (conformance test)
static check green: zero broker/credential code paths in the engine
a source message containing order-construction fields is rejected at the boundary (negative contract test)
LAYER 2
Authorization – the member’s decision
the member decides
Contract
The member works in the engine’s own interface. The engine shows the signal. Beside it, a RAPID-owned approval panel shows the complete order RAPID composed from the member’s local policy: security, quantity, order type, price terms, time-in-force and account. The member places the order with one tap or swipe inside that RAPID-controlled panel. That same act creates the authorization record: the exact terms shown, member, account, source, scope, timestamp and nonce. Immutable once minted.
One approval, one trusted path. No second confirmation, no extra popup. The panel sits inside the engine experience but the runtime controls it, so the engine cannot fabricate “user approved” or change the order afterwards. The engine frames the workflow. It can never produce the member’s yes.
The per-source permission ladder – safe by default
V1 requireddisabled → per-order approval
Later capabilitybounded standing authorization → locally enabled standing execution
Every new source starts disabled. The member can switch on per-order live use right away, with one explicit, logged local act. No waiting period, no intermediate mode. Each order then takes a fresh swipe in the RAPID panel. Standing execution, if it comes, is a separate local grant per source and stays gated until release. It carries a built-in delay between signal and submission as a system requirement, so no order leaves at machine speed. A court has read a six-second response as the software deciding (SEC v. GEL Direct Trust, 2023); the delay is the answer to that reading, not to the underlying question of who decides.
Requirements
R2.1No order reaches dispatch without an authorization record. There is no second door.
R2.2An authorization record is minted only from a member act observed through the runtime’s trusted path, cryptographically bound to the exact terms displayed, the source, account, scope and a nonce – and immutable after mint, enforced in storage, not just in code.
R2.3Permissions are per-source and local; every new source starts disabled, and enabling per-order placement requires a separate logged member act. No permission is inherited from pairing.
R2.4The journal can render a readable written third-party trading authorization for each enabled source: member name, account, source/builder, scope, date, member confirmation and revocation terms. Open: FINRA Rule 3260(b) and 17 C.F.R. §240.17a-3(a)(17)(ii) speak of a natural person as the grantee. RAPID is software. Who the authorization names is a counsel question.
Definition of Done
invariant test: dispatch without an authorization record is rejected
invariant test: altered terms and replayed envelopes are rejected
proven: a newly paired source starts disabled; per-order use begins only after an explicit local member act
readable source authorization can be exported from the journal; future standing mode remains separately gated
LAYER 3
RAPID runtime – validation, policy, dispatch
executes
Contract – the pipeline
authenticated signal → signal validation → member local policy → order composition → RAPID approval panel → authorization record → broker adapter → broker response & reconciliation
The runtime builds the order from the member’s own local policy: sizing, cash reserve, order type, price band, re-peg rule, time-in-force, account, instrument, and frequency and risk limits. The member enters those fields during onboarding, one at a time. Fields start empty. No presets, no one-click imports. Each policy version is journaled as a new event. Reference material stays beside the screen, not on it: the product neither fills a field nor shows a published figure next to one (Keimer; SEC 2008 layout guidance). The onboarding session is recorded, and the consent is asked and answered inside the recording (RCW 9.73.030(3); State v. Fields). Market data is the member’s own: each member connects his own data token. RAPID and the Company hold no data credential.
External lists come straight from the publisher. After one explicit enable act, the member’s runtime fetches a list such as an RMS Universe from the publisher’s own endpoint. The Company never mirrors, caches, relays or re-serves it. The engine gets the list from the member’s runtime as part of the member’s configuration. Never from Company servers.
After authorization, the Dispatcher sends the member’s instruction through the chosen broker adapter to the member’s own broker. Credentials stay per member and local. There is no Company-level trading credential, no netting or routing across members, no “fire all now”. Within the order the member approved, RAPID may use only the price-and-time latitude the member’s own policy granted. The envelope never grows.
Requirements
R3.1Every gate fail-closed; null means reject, not unlimited; missing state means FREEZE.
R3.2Two cancel authorities, both member-owned, both set in the member’s local policy: (1) the emergency stop – member-triggered, suspends every source instantly (stop needs no confirmation, resume requires a written reason), with account-wide cancel available where the member has configured it so; (2) the scheduled end-of-day sweep – cancelling RAPID-managed orders only, so none stands overnight undecided. Taking RAPID’s own orders out of the market is always allowed; touching orders RAPID did not create is a member policy choice, never a default.
R3.3Operator halt – the Company's own stop, distinct from the member's. The operator of a hosted engine can stop that engine emitting signals to every paired runtime at once, and the Company can revoke a source's registration so no runtime accepts it. Both halts are logged with time, actor and reason, and both are drilled. This is the mechanism behind every stated role limit: a limit that cannot be enforced and shown to have been enforced protects nobody (Ranieri Partners / Phillips). The member's emergency stop (R3.2) protects the member; the operator halt protects the founders.
R3.4Trade-capable credentials live only in the local keychain / isolated vault – inaccessible to signal sources; the execution key may advance an order, never enlarge one; orders are followed by broker order-id only, never by guessing.
R3.5Broker adapters are per-broker translations behind one contract – adding a broker adds an adapter, never a change to the core.
R3.6Member policy fields are entered individually, start empty, are versioned and journaled, and cannot be populated from Company presets or another member’s configuration.
R3.7External lists are fetched by the member’s runtime directly from the publisher endpoint after an explicit enable act; Company servers never proxy, mirror or re-serve them.
R3.8Broker access uses the member’s own supported retail API credentials. No Company-level trade credential, cross-member netting, venue selection or batch placement path exists.
Definition of Done
all gates proven by running tests, incl. failure paths (negative tests)
kill-switch drill from the member’s grip on a live order, and an operator-halt drill from the engine side, both measured with timestamps
credential isolation proven: a source cannot reach the vault
adapter conformance suite green before any new broker goes live
LAYER 4
Linked journal & reconciliation – the book that never lies
proves
Contract
The member’s local journal links source → signal → local policy version → composed order → authorization → adapter → broker response as one append-only, provenance-linked, replay-safe chain. Broker API events land as provisional; the broker’s statement is final and promotes them. History is never rewritten, “not even by the hand that wrote it”. Corrections are new events. Append-only, provenance-linked and replay-safe are the required properties. How they are stored and signed is an implementation decision, left open on purpose.
Requirements
R4.1Every executed row carries member, account, source, policy version, authorization and evidence source; cross-account or cross-source matching is forbidden and invariant-tested.
R4.2Broker API events are provisional; the broker statement is final authority and promotes the record without rewriting history.
R4.3Performance numbers follow the protocol: the denominator is always named – WC-at-cost CAGR ≠ realized-on-cash ≠ projections, never blended.
Definition of Done
one query answers “who decided this trade” with the full linked chain
provisional → final promotion proven on a real fill
cross-account/source invariant test proves rejection
What – briefly
A quick read of your codebase (the July version) is encouraging. The distance from your engine to this target looks shorter than the pages above suggest. We see:
•a decision/placement boundary that already exists – useful because the target keeps signal generation in the engine while moving order construction into RAPID
•a preview→place two-step that looks like a natural insertion point for the RAPID-owned approval panel
•decision outputs returned as (bool, reason) – a useful primitive for signal + rule attribution
•a deliberate soak interval between decision and action – a timing primitive worth keeping
•bookkeeping (in-memory records, position-average gains) for which the shared journal and ledger would provide a natural destination
•tuned thresholds that can inform the onboarding fields the member enters himself – never an imported or pre-filled preset
The prompt below – what it's for
Our read is stale, so the honest starting point is a fresh map made by you. This prompt produces a factual inventory of the current engine: modules, flows, decision points, seams. Run it, rewrite it, or skip it. Whatever map comes out is the shared picture we plan the integration from.
Produce a factual component map of this trading engine. Facts only – no judgments, no design advice. Deliver the result as one self-contained HTML document. Cover:
1. MODULE OVERVIEW – each file/module, one line on what it does (cite function names).
2. DATA FLOW – inputs (broker API? files?), outputs (orders? emails? logs?), and the order of a typical run.
3. DECISION POINTS – exactly where a BUY/SELL decision is made; which thresholds are hard-coded vs configurable.
4. BROKER COUPLING – which API and which calls (order placement, status, cash); retry and error handling around them.
5. BOOKKEEPING – how lots, markers and gains are recorded; definitions implicit in the code.
6. DEPENDENCIES & RUNTIME – language, libraries, startup, assumptions (account, subscriptions, machine).
7. SEAM CANDIDATES (observation only) – existing boundaries between "signal" and "execute".
Cite file + function for every claim. Mark assumptions [ASSUMED]. Keep code excerpts minimal.