
preflight-review
io.github.mqfarooqi1/preflight-review
Launch-readiness reviews for AI workflows: blocker-first checks, evidence, sign-off, client brief
Documentation
Preflight Review
Project website · Sample client brief · Releases
Launch-readiness reviews for AI agents and automations, as an MCP server.
Before a workflow that drafts customer replies, searches internal documents or moves data goes live, ask who approves its riskiest action, who can stop it, and what happens when it receives an unexpected input. Preflight asks those questions one at a time, blockers first, records the evidence for each answer, keeps the human sign-off separate from the checks, and exports a brief you can hand to a client.
- Blocker-first checklist. Approval boundary, rollback, scope and silent failure on every review, plus checks for the kind of workflow it is.
- Evidence and retests. Each test result needs a named owner and a control. The recommendation comes from the current results, and the brief retains earlier attempts, including results withdrawn as recorded in error.
- A human decides. The decision is recorded separately and freezes the review. The brief captures the findings that were open at sign-off.
- Linked revisions. A changed workflow starts a review that shows the old and new values and asks for fresh evidence.
- Plain-text evidence in the brief. Preflight escapes recorded text before inserting it into Markdown, so pasted evidence cannot add sections or links.
- Two storage modes. Local mode stores reviews in SQLite. In stateless mode, the client carries signed review records between calls.
Quick start
Preflight supports Python 3.11 to 3.15. Check the package version with uv.
uvx preflight-review-mcp --version
Add it to Claude Code with this command.
claude mcp add preflight -- uvx preflight-review-mcp
For Claude Desktop, add the server to claude_desktop_config.json.
{
"mcpServers": {
"preflight": { "command": "uvx", "args": ["preflight-review-mcp"] }
}
}
To use pip, run python -m pip install preflight-review-mcp, then configure
your stdio-capable client to run preflight-review-mcp. To install directly from
GitHub, use python -m pip install git+https://github.com/mqfarooqi1/Preflight-MCP.
If the client cannot find the command, use the full path of the executable or
of the Python you installed it into with the arguments -m preflight_mcp.
Try this request in your MCP client.
Start a customer-support launch review for a workflow that drafts refund replies from our support policy. An agent reviews each draft. Our support lead can disable the workflow. Ask one question at a time. Use synthetic evidence for this demo and label it as such.
Try the demo
From the repository root, install Preflight and run the synthetic refund review through a real stdio MCP session in both storage modes.
python -m pip install .
python examples/demo.py
The demo records an approval failure, updates the control, records a passing retest, and links a follow-up review. It uses a temporary database for local mode. Read the sample client brief or see what changed in 0.2.0.
Use Preflight in Codex
In a trusted project, add this to .codex/config.toml and replace the example
paths. The database setting is optional. See the
Codex MCP configuration guide.
[mcp_servers.preflight]
command = "/absolute/path/to/python"
args = ["-m", "preflight_mcp"]
[mcp_servers.preflight.env]
PREFLIGHT_DB = "/absolute/path/to/client-reviews.sqlite3"
For a virtual environment named .venv, the Python executable is
.venv/bin/python on macOS and Linux and .venv/Scripts/python.exe on Windows.
TOML accepts forward slashes in Windows paths or backslashes in single quotes.
Start from a skill
Copy the six folders in skills/ into .agents/skills/ in the
project you want to review. Keep each folder with its SKILL.md. Open the
project in Codex and invoke $preflight to start, resume, or compare a review.
In another Agent Skills client, import the folders according to its skill setup.
Codex skills guide
| Skill | Use it to |
|---|---|
preflight | Choose where to begin or pick up an existing review. |
preflight-scope | Define the workflow and pick a template. |
preflight-challenge | Identify risks and define checks. |
preflight-verify | Record observed outcomes and follow up on failed or inconclusive checks. |
preflight-handoff | Export a brief and capture an explicit human decision. |
preflight-compare | Review what changed and identify the evidence the revision needs. |
The skills also guide an unsaved draft in the conversation when the MCP server is unavailable.
Start from an MCP prompt
In local mode, clients that expose MCP prompts can use any of these entry points. You can also call the tools from a plain-language request. In stateless mode, use the tools with the current signed record.
| Prompt | Arguments | Use it to |
|---|---|---|
launch_review | template (default customer_support) | Start scoping a workflow. |
continue_review | review_id | Resume the next open check from saved state. |
client_handoff | review_id | Draft a private brief with findings and any recorded decision. |
How a review runs
- Start with what triggers the workflow, the data it reads, the actions it
can take, who approves them, and how it is stopped and undone. Pick from
customer_support,document_searchorinternal_operations. - Answer the next question.
get_next_questionreturns one open check at a time, blockers first. Name an owner and the control. Add a custom check if the template misses a risk. - Test the control in your test environment and record what happened,
with a ticket, log or run reference. Update a failed control before retesting.
Pass the tested
control_versionasexpected_control_versionto reject results for a control that changed since the test. If evidence is pending, pass the check ID indeferred_check_idsto skip the question for this session while keeping the finding open.blocked_by_deferralmeans the remaining checks were deferred. A result recorded in error, such as evidence from another check, is withdrawn withwithdraw_test_resultand a reason; the check reopens and the attempt stays in its history. - Decide. Record a named reviewer's explicit decision and reason.
approverequires every check to pass. With findings open, the reviewer can chooseapprove with conditionsorhold, and the decision records the open findings. Recording the decision freezes the review. A review that will not reach a decision, such as one for an abandoned workflow, is closed withclose_reviewinstead; it leaveslist_reviewsunlessinclude_closedis set. - Hand over the brief.
export_briefexports the decision, the workflow and every check with its evidence and test history, in Markdown.get_reviewreturns the same review as structured data. - Start a linked revision. Use
revise_workflowwhen the workflow changes or provide arevision_reasonto start a fresh evidence cycle after a recorded decision or a closure on the same workflow. If a custom check no longer applies, give the reason and pass its ID inomit_custom_check_ids. The original finding stays in the earlier review.
| Recommendation | When |
|---|---|
| blocked | a blocker check is open |
| ready with conditions | every blocker passed, other checks are open |
| ready for review | every check passed |
The recommendation is advice. The decision belongs to the named reviewer.
Tools
| Tool | What it does |
|---|---|
list_templates | the templates and the checks each one asks |
start_review | start a review of a new workflow, with its checklist |
get_next_question | the next open check and the question to ask about it |
add_review_check | add a custom check to an open review |
record_control | name the owner and the control for a check |
record_test_result | record a test outcome and its evidence |
withdraw_test_result | withdraw a result recorded in error; it stays in the history |
record_decision | store a named reviewer's decision and freeze the review |
close_review | close a review that will not reach a decision |
revise_workflow | start a linked review with a fresh evidence cycle |
get_review | the whole review as data, with its state and recommendation |
export_brief | the review as a Markdown brief for people |
list_reviews | saved reviews, newest first (local mode) |
Every tool returns typed structured output, and its description says when to
use it rather than the tool next to it. The server supplies read-only
annotations for clients that use them; only record_control is marked
destructive, because it replaces a check's owner and control. An unknown check
error lists the valid checks, and an early approve names the checks still
open.
Storage modes
Local (default). Reviews are kept in SQLite at
~/.preflight-review/reviews.sqlite3. Set PREFLIGHT_DB to an absolute path to
keep a separate file per client. Reuse that database when resuming a review.
Tools refer to reviews by review_id.
Stateless, for hosting. Start the server as
preflight-review-mcp --mode stateless (or set PREFLIGHT_MODE=stateless), and
set PREFLIGHT_SIGNING_KEY to a secret of at least 32 characters, the same for
every copy of the server. Generate a signing key with this command.
python -c "import secrets; print(secrets.token_hex(32))"
In stateless mode, tools that load a review take the full signed object in the
review argument. After a tool changes a review, keep the new review from its
structured output and pass it back exactly as returned, signature included.
Keep both records when creating a linked revision so you can compare them later.
Preflight verifies the HMAC-SHA256 signature and rejects edited records. The
client can still load any older signed version it holds. The brief prints the
record's signature and last-updated time.
Reviewer responsibilities
Your team runs the workflow tests, verifies the evidence, confirms the reviewer's identity, and controls deployment. Preflight records the reported observations, references and decision. Keep customer records and secrets in their source systems.
Development
pip install -e ".[dev]"
pytest
ruff check src tests examples
python examples/demo.py
CI runs the tests and the demo on Linux, Windows and macOS with Python 3.11 to 3.15.
Licence
MIT
preflight-review-mcppip install preflight-review-mcp