Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/implementation-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ without the existing approvals. Record the mode, routine defaults, unresolved qu
and explicit decisions in IMPLEMENTATION_REPORT.md under "Scientific assumptions and decisions"; update the
existing report rather than creating another specification file.

RAW-DATA ACCESS GUARD (all profiles, modes and stages): Do not directly open, read, sample,
preview, print, grep, query, dump, export or otherwise inspect real patient-level records, raw MEDS
event files or underlying clinical tables through the agent session, shell commands, notebooks or
ad hoc scripts. A supplied data path, credentials, exploratory mode or implementation request is
NOT authorization to inspect raw data. Use synthetic fixtures for implementation and local tests;
source code, documentation, schemas and non-sensitive metadata may be inspected. Only after explicit
human approval for a specific demo or full-data gate may the approved, auditable algorithm pipeline
process real MEDS inputs programmatically for that run. Approval to execute the pipeline does not
authorize the agent to browse records or expose raw rows in output, logs, reports, chat or commits.
If direct record inspection seems necessary for debugging, stop and request separate, narrowly scoped
human approval before doing so. Keep evaluation outcomes out of scoring and use the core key-only
index reader for prediction keys when the relevant data access is authorized.

For automatic profile selection, choose one or more profiles supported by documented source behavior:
supervised, finetune, probe, zero_shot_direct, zero_shot_materialized or predict_only. Record evidence for
each choice and proceed when the evidence is clear. Do not add speculative capabilities merely because
Expand Down
1 change: 1 addition & 0 deletions docs/prompt-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ You can edit the result before copying. Demo and full-data execution retain thei
<label>Requested endpoint
<select name="scope"><option value="local">Implementation and local tests</option><option value="integration">Also run MEDS-DEV integration</option><option value="full">Prepare for demo and full-data evaluation</option></select></label>
<p class="pb-hint">Preparing for full evaluation does not authorize a demo, dataset download or cluster run. The existing review gates still apply.</p>
<p class="pb-hint"><strong>Raw-data access guard:</strong> Do not inspect real patient-level records or raw MEDS files directly, even if a path or credentials are supplied. Use synthetic local tests. Only a specifically human-approved pipeline run may process real inputs; do not preview, print, log or copy raw rows.</p>
<label class="pb-check"><input type="checkbox" name="exploratory_mode" aria-describedby="exploratory-mode-help"> Exploratory mode — allow provisional scientific assumptions</label>
<p class="pb-hint" id="exploratory-mode-help">Off by default. The agent normally asks before implementing a major unresolved scientific choice, such as unspecified feature construction; routine defaults may proceed with documentation. When enabled, provisional design choices must be recorded and reviewed before claiming faithful reproduction. Leakage, cohort/target definitions, evaluation validity and execution approvals still require resolution.</p>
<label>Additional constraints (optional) <span class="pb-hint">For example: algorithm name, hardware limits, checkpoint requirements or implementation priorities.</span>
Expand Down
3 changes: 3 additions & 0 deletions docs/tests/prompt_builder.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ test("all source, destination, profile, task, scope and ambiguity modes preserve
assert(prompt.includes("minimalist, auditable, object-oriented"));
assert(prompt.includes("Do not generate new tasks,"));
assert(prompt.includes("In BOTH modes, ambiguities about leakage"));
assert(prompt.includes("RAW-DATA ACCESS GUARD (all profiles, modes and stages):"));
assert(prompt.includes("NOT authorization to inspect raw data."));
assert(prompt.includes("process real MEDS inputs programmatically for that run."));
assert(prompt.includes("Require review of these decisions before claiming faithful reproduction."));
assert.equal(prompt.includes("Exploratory mode explicitly enabled:"), exploratory_mode);
assert.equal(prompt.includes("Confirmation required (default):"), !exploratory_mode);
Expand Down
8 changes: 6 additions & 2 deletions docs/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ cohort/target definitions or evaluation validity block dependent work. Independe
Evaluation tasks, when supplied, are already ready: labels plus task configs, bundle identity and dataset
context. The builder does not ask the agent to invent tasks or extract new labels. Missing tasks defer
only the corresponding evaluation. Choose the intended work scope explicitly; demo and full-data runs
still require their existing human approvals. The [static prompt](#copyable-algorithm-implementation-prompt)
below is the same maintained source used by the builder.
still require their existing human approvals. The agent must **not inspect real patient-level records or
raw MEDS event files directly** (including ad hoc shell/notebook queries or row previews). Use synthetic
data for local tests. Only a specifically human-approved demo or full-data pipeline may process real
MEDS records programmatically; run approval never permits viewing, logging or copying raw rows.
The [static prompt](#copyable-algorithm-implementation-prompt) below is the same maintained source
used by the builder.

The template supplies instructions, interfaces and executable checks. It does **not** launch an agent
or run an unattended implementation service. The prompt works as ordinary agent input and includes
Expand Down
Loading