Inspiration

AI outputs often become more authoritative as they move through reports, summaries, recommendations, and institutional workflows.

A model may originally say “possible candidate,” “high similarity,” and “identity unverified.” A later report may compress that into “identified suspect.” The wording becomes stronger even though the evidence did not.

P-Gates was built to make that transformation visible before it produces real consequences.

What it does

P-Gates is a PAL, PECAN, and PEA route auditor for AI-generated reports, recommendations, decision chains, and model handoffs. After first mention, the combined route is called PPP.

  • PAL separates observations, inferences, assumptions, and unresolved remainder.
  • PECAN identifies consequential crossings, authority drift, provenance loss, uncertainty compression, and anti-backflow failures.
  • PEA surfaces affected people, burdens, proportionality, privacy, contest, remedy, and human governance.
  • SEED produces bounded human-facing language without erasing uncertainty.

P-Gates also produces a phrase-level trace showing the original phrase, detected problem, safer wording, and responsible framework layer. Results can be exported as JSON or Markdown.

P-Gates does not make decisions or create legal, ethical, empirical, or institutional authority.

How it works

P-Gates is a FastAPI application with a browser interface and strict typed output schemas.

Mock mode is deterministic and requires no API key.

In live mode, GPT-5.6 receives only the submitted source text and four short framework references. The full corpus is not sent. The response is validated locally with Pydantic. The API key remains server-side, store=False is used, and diagnostics exclude prompts, source text, credentials, headers, and private corpus material.

How I used Codex

I used Codex to inspect the framework corpus, scaffold the FastAPI application, implement the frontend and typed schemas, add mock and live provider paths, diagnose failures, build safe diagnostics, write tests, review the interface, add GitHub Actions, and perform privacy and demo-readiness audits.

I retained responsibility for the conceptual architecture, framework definitions, boundaries, release rules, acceptance of generated changes, and final public release.

How I used GPT-5.6

ChatGPT with GPT-5.6 helped review architecture, troubleshoot local workflow issues, and turn my specifications into bounded prompts for Codex.

GPT-5.6 also powers the optional live structured-analysis provider inside P-Gates.

Testing

The current suite passes locally with 25 tests. GitHub Actions runs the offline suite on pushes and pull requests to main. CI requires no API key and makes no live API calls.

Built with

Python, FastAPI, Pydantic, HTML, CSS, JavaScript, OpenAI Responses API, GPT-5.6, Codex, Pytest, GitHub Actions

Built With

Share this project:

Updates