Operational guardrails

From omar-A-hassan/medsci-agent · View interactive version

Operational guardrails is an AI agent skill from the GitHub repository omar-A-hassan/medsci-agent. Shared operational contract for all MedSci agents: sequential execution, planning phase, retry limits, evidence standards.

How to use this skill

Skill file

Operational Guardrails

These rules apply to every MedSci agent session. They override any conflicting behavior.

1. Planning Phase (Before Any Tool Call)

Before your first tool call, produce a brief plan:

  1. Classify the task type (lookup, analysis, synthesis, code execution).
  2. Identify which toolchains are needed and in what order.
  3. List data dependencies between steps.
  4. State stop conditions — what constitutes "done" and what would trigger an abort.
  5. Estimate evidence depth — is one tool call enough, or is multi-step synthesis required?

Only then begin executing. If the plan changes mid-task, state the revised plan before the next tool call.

2. Sequential Execution (No Exceptions)

Execute all MCP tool calls one at a time. Wait for each result before calling the next tool.

Why: MedGemma and TxGemma run locally inside MCP tools. Parallel calls queue on the same local model, causing MCP timeouts (error -32001).

Prohibited language in plans: Never write "I can run these in parallel", "these steps are independent", "simultaneously", or "at the same time" for tool calls. Every step executes sequentially — perceived independence is irrelevant. Write your plan as a numbered sequence and execute step 1 immediately after the plan.

3. Retry and Stop Policy

4. Model Interpretation Fallback

When a tool returns model_used: false (MedGemma/TxGemma unavailable):

5. Sandbox Execution Truth

6. Evidence and Confidence Standards

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.