Back to skills
SKILL.md
Physgate Audit
ASecurityTask 3: Decoupled Blank Examiner + optional parallel Multi-Family blind solve & Gate 5 closure -> AUDIT_REPORT.md.
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added December 2, 2026
Works with
Security analysis
100/100Pro scans all 3 files and shows the line behind each finding
npx -y skills add oldsixxiaolv/PhysGate --skill physgate-audit --agent claude-codeAre you the author of Physgate Audit?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/oldsixxiaolv-physgate-audit)---
name: physgate-audit
description: "Task 3: Decoupled Blank Examiner + optional parallel Multi-Family blind solve & Gate 5 closure -> AUDIT_REPORT.md."
disable-model-invocation: true
argument-hint: "[optional: c|confidential] [engine1|engine2] [target solver]"
---
# `/physgate-audit` — Task 3: Decoupled Breaker Audit & Stage 7 Closure (Stages 5–7)
**Goal**: Audit `<solver_module>` + physics tests via **strictly decoupled empirical experiments** (**solvers never write or grade the exam**; a **Neutral Blank Examiner-Clerk** writes Sections `1–3` of `AUDIT_REPORT.md` verbatim), ask the researcher whether Stage 6 fixes need a re-audit, and close at **Stage 7 (`🛑 STOP GATE 5`)** only after human code-reading & private holdout verification.
- **Confidentiality**: Default is Open Research. If `c`/`confidential` or restricted data is active, `Read` [`./references/confidential-mode.md`](./references/confidential-mode.md) first and pass `--confidential` to `gate.py stage`.
- **UI Rule**: Never run blocking shell TTY prompts (`read`, `select`, `fzf`); use clickable choice cards (`ask_question` / `AskUserQuestion`) or numbered Markdown options.
## 1. Breaker Engine Selection & Mechanical Staging
1. Unless passed via `engine1|engine2`, ask the researcher to pick the **Breaker Engine** (1 clickable card / numbered choice):
- **`[1] Host Blank Examiner Sub-Agent (Default · 0 External Setup)`** — Spawns **1 fresh, zero-context native Sub-Agent of the host client** (Claude `Task`, Antigravity `invoke_subagent`, or Codex isolated sub-session) given **only** `$STAGE_DIR` and **zero Main AI chat history**.
- **`[2] Multi-Family Parallel Blind Solve + Blank Examiner (Enhanced · 1–N Rounds)`** — Run `python3 ../physgate-build/scripts/gate.py probe-cli` to verify `>= 1` distinct-family external CLI (`gemini`, `codex`, `claude`, `opencode`; if none available, report honestly and offer `[1]`, zero roleplay).
2. Run `python3 ../physgate-build/scripts/gate.py packs` to include any matching subfield pack's *Tricky Regimes & Mutations*.
## 2. Stage 5: Strictly Decoupled Empirical Execution
- **In Engine `[1]`**:
- Run `python3 ../physgate-build/scripts/gate.py stage --for examiner SPEC.md <solver_module> tests/test_physics.py [tests/test_adversarial_cases.py]` to build isolated `$STAGE_DIR`.
- The host zero-context Sub-Agent executes Steps `5.1`–`5.3` in one pass inside `$STAGE_DIR`.
- **In Engine `[2]`**:
- **Phase 5a (Parallel Blind Solvers Only)**: For each distinct-family external model `i`, run `gate.py stage --for blind [--confidential] SPEC.md tests/test_physics.py [tests/test_adversarial_cases.py]` (`gate.py` mechanically blocks `<solver_module>` from blind staging!). Enforce **`🛑 GATE 4`** if Confidential, then dispatch all Blind Solvers **concurrently in parallel** to output `ref_solver_<i>.py` (**zero exam authoring**).
- **Phase 5b (Neutral Blank Examiner-Clerk)**: Stage `<solver_module>` + `ref_solver_1..K.py` + `SPEC.md` + staged tests via `gate.py stage --for examiner [--confidential]` (`🛑 GATE 4` if Confidential + external CLI). Run on a **separate distinct-family stateless CLI** when $\ge 2$ external families exist—or on the **host zero-context Sub-Agent** when only 1 external family exists (or when `<solver_module>` is restricted from external CLIs)—executing:
1. **Step 5.1 — Mutation Alarm Check**: Inject 3–5 realistic physics bugs into `$STAGE_DIR/mutants/` copies of `<solver_module>` (sign flip, dropped coordinate weight, $2\times$ prefactor, broken BC flux) and run `pytest` (`FAILED` = **Killed** ✅; `PASSED` = **Survived** ❌ exposing a missing test).
2. **Step 5.2 — Tricky Exam & Cross-Solver Check**: Author `exam_tricky_cases.py` (3–5 demanding legal regimes: near-zero bounds, $\lambda \to 0$, $10^6:1$ stiffness, non-uniform grids, sharp pulses), measure invariants, and in Engine `[2]` run `<solver_module>` head-to-head against `ref_solver_1..K.py` (`max |y_main - y_ref_i|`).
3. **Step 5.3 — Verbatim `AUDIT_REPORT.md`**: Examiner writes Sections `1–3` to `$STAGE_DIR/AUDIT_REPORT.md`, copied **verbatim** to `<project_root>/AUDIT_REPORT.md` (zero Main AI filtering):
```markdown
# Empirical Breaker Audit Report (`AUDIT_REPORT.md`)
> **Examiner**: <Host Blank Sub-Agent | Distinct-Family Stateless CLI> (Sections 1–3 Verbatim, 0 Main AI Filtering)
> **Mode / Engine / Round**: <Open|Confidential> · <Engine [1]|[2]> · Round <k>
> **Solver & Locked Test SHA-256**: `<solver_module> (<sha>)` | `tests/test_physics.py (<sha>)`
## 1. Mutation Alarm Check (Staged Tests vs. Temp Mutants)
| Mutant | Injected Physics Defect | `pytest` | Verdict (`Killed` ✅ / `Survived` ❌) | Missing Check Exposed |
| :--- | :--- | :---: | :---: | :--- |
## 2. Neutral Examiner's Tricky Exam Cases (`exam_tricky_cases.py`)
| Exam ID | Demanding Legal Regime | Invariants Checked | Measured Residual | Status |
| :--- | :--- | :--- | :--- | :---: |
## 3. Multi-Family Blind Cross-Solve Comparison *(Engine `[2]` Only)*
| Case ID | Main AI (`<solver_module>`) | Blind `ref_solver_1..K` | Max Discrepancy | Diagnosis |
| :--- | :---: | :---: | :---: | :--- |
```
## 3. Stage 6: Human Ruling, Fixes & Ask-Human Re-Audit Prompt
1. Present verbatim `AUDIT_REPORT.md` first and ask which findings to fix (`tests/test_adversarial_cases.py` + `<solver_module>`), ignore, or address via upstream rollback.
2. Append **`## 4. Stage 6 Human Ruling & Post-Fix Choice`** to `AUDIT_REPORT.md`. After fixes pass fresh `python -m pytest -v`, show the concise `git diff` summary and **ask the researcher**:
- **`[1]` Pass directly to Stage 7 (`🛑 STOP GATE 5`)** · **`[2]` Roll back to Stage 5 for a fresh re-audit** · **`[3]` Roll back to `/physgate-build` or `/physgate-design`**.
## 4. Stage 7: Mandatory Human Code-Reading, Holdouts & Persisted Sign-Off (`🛑 STOP GATE 5`)
**Passing automated tests NEVER closes `Task 3`.** Present directly in chat **and persist into `## 5. Stage 7 (STOP GATE 5) Human Closure Sign-Off` of `AUDIT_REPORT.md`**:
1. **Equation-to-`file:line` Map** covering every equation & BC in `SPEC.md`;
2. **6-Column Library Behavior Table**: `| Call | file:line | Axis / Dim | Sign / Normalization | Boundary Stencil | NaN / Extrapolation Behavior |`
3. Invite the researcher to run any private `.physgate_local/holdout/` tests off-AI; if an issue surfaces, **ask whether to loop back to Stage 6 or record under Residual Limitations**. Close **only after** explicit human confirmation of reading the code and library table.
Files in this skill
- SKILL.md
- agents/openai.yaml
- references/confidential-mode.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.