The Governance Layer · Reference implementation · RG-01 (QIS Reference Gate)

The reference gate.

The Schedule Set defines a common record for every governed quantity in the clause library: a limit, a value, a unit, an enforcement point, a consequence, and who set it and when. It closes by naming its own open question — a schema defines what a valid record looks like, not whether the thing it describes actually works. This is the answer. qis-gate is a small, deliberately unglamorous piece of software that takes a schedule conforming to that record and a proposed action, and returns a decision: permit it, reject it, or something in between that neither word quite covers. It is the first artifact in this ecosystem that runs rather than reads.

Reference only · your machine

RG-01 is reference software you install and run yourself. Its decisions are reference findings: bindable is always false, a PERMIT authorizes nothing and a REJECT prevents nothing. It is not hosted here — this site evaluates no actions, and the MCP (Model Context Protocol) server at mcp.qisfund.com is a read-only corpus with no evaluation tool. Enforcing a live limit belongs inside the deploying institution.

Where a limit is enforced: Runtime Bound is a separate, independently released project, being developed as an institution-owned execution boundary for agent-driven actions. It is not part of QIS (Quantitative Investment Strategies), these sites do not run it and its admission core does not depend on QIS. Its public site describes a local demonstration with simulated interception and claims no live institutional activation. See Related projects.

See it running, end to end

The worked example on this page is one command among five. The walkthrough runs the same schedule through all five stages — Define, Validate, Evaluate, Record, Inspect — with the real terminal output at each, in four minutes, from a clean install.

The case it exists to demonstrate.

Every governance row declares an enforcementStatus: enforced, unenforced, or partial — a control exists that detects a breach but does not prevent it. Row S-01-B-009 of the worked example schedule in the MARQUE (a reference framework organized around eight questions) working paper is partial: a permitted-instrument count, checked only in a nightly reconciliation report, with no pre-trade control at all. When a proposed action breaches a limit like that, two answers are available and both are wrong. Permit it silently, and the gap the schedule's author went out of their way to record disappears into a routine approval. Reject it, and the record claims a block that nothing in the actual system would have made — which is not a governance decision, it is a fiction. The gate returns a third answer, PERMIT_ADVISORY: the action proceeds, exactly as it would with no gate in front of it at all, and the record says plainly that a documented limit was exceeded and nothing stopped it. That one outcome, more than the others in the decision table, is the reason this package exists.

$ qis-gate evaluate --schedule s01b.json --action unenforced_breach.json
DECISION: PERMIT (ADVISORY)

  [PERMIT (ADVISORY)] row S-01-B-009
      observed 1 vs. limit 0 instruments
      enforcement (partial): None. The permitted-instrument set is checked
      in a nightly reconciliation report; it is not enforced pre-trade.
      Documented limit exceeded (observed 1 > limit 0 instruments).
      Declared partial: detection exists but does not prevent the action;
      the gate cannot block this and did not.

What it does.

Three commands. qis-gate evaluate reads a schedule and a proposed action, checks the action against every row the schedule governs, and writes a decision and a per-row finding for each. qis-gate verify checks a ledger of past evaluations for tampering. qis-gate explain renders one past evaluation back into the same human-readable form evaluate prints, from nothing but the ledger. Every decision resolves to one of eight outcomes, run against the actual conformance corpus:

ConditionOutcome
Value within the row's limitPERMIT
Limit exceeded; enforcementStatus is enforcedREJECT
Limit exceeded; enforcementStatus is unenforced or partialPERMIT_ADVISORY
Row's review date has passed as of the actionREJECT_STALE
Action references a quantity the schedule doesn't governREJECT_UNGOVERNED
Enumerated-set row; proposed value outside the setREJECT
Row is incompleteREJECT
Schedule fails schema validationFAIL_CLOSED

The boundary of what it does.

qis-gate reads two documents and returns a decision about the one action it was asked about — nothing wider. It does not place an order, does not set or adjust a schedule's values, and has no persistent connection to any order management, position keeping, or market data system. A PERMIT is not sign-off and a REJECT is not a finding of wrongdoing; each is the schedule's own answer to the question it was asked, recorded exactly, and no wider claim should be read into either one.

Determinism, and why it is enforced rather than assumed.

The same schedule and the same action, evaluated on different days, produce the same decision and the same findings. Staleness is checked against the action's own proposedAt timestamp, never against the clock the gate happens to run on — the one line of code that makes an evidence record from a year ago replayable evidence today rather than a claim nobody can re-check. Every evaluation is a pure function of its two input documents; only a record's own metadata — its id, its timestamp, its position in a ledger — varies between runs.

The schema it validates against, and where it came from.

The governed-quantity JSON Schema published on the capital pillar's open data surface is the same schema the gate ships inside itself — written into the package from the exact build step that publishes it here, so the two cannot silently drift apart. qis-gate evaluate makes no network call by default; --live-schema fetches the version published right now instead of the one the package shipped with, which is the only network call this package ever makes, and only on that explicit request.

The test corpus.

Built primarily around the real worked example from the MARQUE working paper rather than synthetic fixtures — the S-01-B schedule quoted above is the actual schedule from the paper, not a stand-in. One fixture exists for every row of the decision table, plus the boundary and fault-injection cases a decision table alone does not surface: an action proposed exactly on a row's review date (current, not stale), a ledger deliberately edited after an evaluation was appended (caught, and the exact record named), a ledger with a record removed (caught the same way). The corpus runs as part of this ecosystem's own build gate — a broken gate fails the site's build, not only its own test suite.

Asking before acting, not after.

A command line answers a person, and a CI step answers a build. Both arrive after the fact, or beside it. The gate also serves the Model Context Protocol, so the agent itself can consult the same reference semantics at the moment it is deciding. What it gets back is a reference finding, not an authorization; the server runs locally, not at mcp.qisfund.com:

pip install git+https://github.com/OceanGenius/qis-gate
qis-gate mcp

Register that as a stdio MCP server and an agent gets three tools: evaluate_action (how this schedule reads this action — returning the same record the command line produces), verify_ledger, and explain_decision. The action is passed inline, because an agent holds an action, not a file; the record hashes the content either way.

It runs on the caller's own machine and makes no network calls. That is the point rather than a limitation: a schedule is an institution's record of what authority it granted and to whom, and a ledger is its evidence. A hosted evaluator would mean a firm posting its own authority limits to someone else's server to find out whether its own agent may act. A rejection is also not an error. Every decision the gate reaches — including REJECT — returns as a successful tool result, because an agent framework that retries on tool errors would otherwise read “you are not authorized to do this” as a transient fault and try again.

Relationship to the framework.

RG-01 completes the Schedule Set the way the Schedule Set itself completes the four instruments before it: by supplying, concretely, what the prior artifact left as form. It implements MARQUE Question 1, Authority and Question 3, Drift — a gate that evaluates a proposed action against a recorded limit is authority and drift stated as running code rather than as a question a reviewer asks. On KYA, it verifies D01, Authority, D03, Drift, and D04, Auditability: an institution that can run this gate against its own schedule, rather than describe its governance in narrative, is evidenced on whether it can demonstrate conformance, not merely claim it.

Source.

The package and its full test corpus are published on their own, separately from the rest of this ecosystem's source, at github.com/OceanGenius/qis-gate, under the MIT license. pip install git+https://github.com/OceanGenius/qis-gate, then qis-gate demo reproduces the worked example above with nothing else to configure. The package declares Python 3.10 or later and one runtime dependency, jsonschema; this ecosystem's build runs its full test corpus under the build's own interpreter (CPython 3.12), which is the runtime tested here.

Source and provenance

Issuing body
QIS Ecosystem
Version
qis-gate 1.2.0
Related source
Public repository
Last verified
Not recorded
Content held
Published as a page on this site; no separate content digest is computed for page text.
This corpus's work
Original work of the QIS Ecosystem, under the terms at https://qistrust.com/license/.
Open terms (quoted from the site footer)
Two things are deliberately open and stay open: the reference gate implementation is MIT licensed (it runs on the caller’s own machine; this site does not evaluate actions), and the governed-quantity record schema is free to implement and conform to with attribution — a standard nobody may build against is not a standard.

No dated claim about this source is recorded in the verification register; its locator and description were not re-verified against the source for this record. The same record, field for field, is in api/provenance.json (qis-provenance-1) and in this page's structured data.