SanityOps Inspection Report — Medication Information Assistant
How to read this report. This is an automated self-audit, not a human review: the sanityops-inspector skill ran the SanityOps checklist against one test artifact (a medication-information assistant) and recorded a verdict for every applicable rule. Read FAIL P0 as "fix before release", P1 / P2 as "fix soon / consciously accept", and N/A as "structurally does not apply here"; severities are checklist-assigned, not risk scores. PASS and N/A lines are folded by default — the body shows every FAIL plus per-stage tallies, and the complete per-rule verdict ledger is emitted on request. The result was produced by a single model with no independent verification and is not a conclusion of the official SanityOps engine.
Report header (provenance)
| Field | Value |
|---|---|
| Host model | Executed by the Code Agent; the concrete model name is not declared in this environment (Host model: undeclared in this environment) |
| Single-model statement | Extraction (pre-inspect) and inspection were performed by the same host model in the same context; no independent verifier reviewed the extraction or the verdicts. |
| Skill package | sanityops-inspector v2.0.0 (orchestrator) → sanityops-extract-only v2.0.0 + sanityops-inspect-only v2.0.2 |
| Specification baseline | SanityOps Framework v1.1 (2026-10 release) |
| Non-official result | This result is produced by the skill rule package applied by the host model; it is NOT a conclusion of the official SanityOps engine. For a full inspection use sanityops-cli. |
| Inspection date | 2026-11-21 |
| Artifact version label | Not supplied by the user → undeclared (the document's own sanityops-cli v0.1.5 / 2026-10-02 wording is artifact content, not a version basis) |
| Input | D:\My Docunments\AI\artifacts-report\test-cases\prompt-skill-tool\medication-information-assistant.md |
| Re-run basis | Source artifacts re-verified verbatim against the existing IR (Prompt/Skill bodies and all 5 Python tool blocks: 0 line diffs), so the IR was reused unchanged |
| Fidelity (per object) | Prompt full original; Skill full original; Tool ×5 assembled (Python dict literals transcribed field by field). No incomplete / summary object, so no rule family was skipped. |
| Presentation mode | Folded verdicts (skill §6.12): the body carries FAIL / uncertain / related / advisory detail plus per-stage tallies; PASS and N/A lines are folded by default — the full per-rule ledger is emitted on request, not printed |
Executive summary
Single-agent full flow (A → B → C → D → E → F → G, non-blocking). Stage A / B / D / E / F executed; Stage C Gate-0 passed (G0-4 complete); Risk Explicit found no explicitly expressed risk item.
Defect counting (graded and ungraded kept separate):
- Graded defects: P0: 2 · P1: 2 · P2: 1
- Reference level (this L assigns no P) FAIL: ∅: 8 (includes QD-T-4.7 for each of the 5 Tools)
- Baseline gate failures (ungraded, not scored): 2 (QD-S-0.5, QD-S-0.8)
- Could not judge: uncertain: 1
- Same-source associations (related, not double-counted): 1
- Structurally not applicable: N/A: 108
- Total judged: 316 (Stage A 244 · Stage B 29 · Stage D 43)
Top findings (max 5):
QD-P-1.2.4— A patient/public-facing (C-end) assistant never discloses its AI identity; it only says it is "not a doctor or pharmacist" (P0).QD-P-2.5.6— No instruction-versus-data trust boundary: nothing states that user messages or tool returns must not be treated as instructions (P0).QD-P-2.4.4— A multi-turn flow with a per-conversation tool budget exists, but no cross-turn / cross-session memory boundary is declared (P1).QD-PM-6.7— Health data is processed, but applicable compliance requirements and retention boundaries are undeclared (P1).QD-PS-1.6— The Prompt allows 400-word interaction answers while the Skill caps every answer at 150 words (reference level ∅).
Not run: Risk Implicit (dynamic exploitability) and the runtime Quality subsets. The embedded-code QC ran in Stage A; Risk Explicit ran in Stage E.
Upgrade pointer: For the complete ruleset plus the Risk (Explicit/Implicit) and Quality subsets, use sanityops-cli (https://github.com/sanityops-org/sanityops-framework/blob/main/framework/try-the-tools.md).
Terminology quick reference
| Family | Means | Plain meaning |
|---|---|---|
QD-P / QD-S / QD-T | Inspect defect IDs | a defect inside the Prompt / Skill / Tool Schema |
QD-PS/PT/ST/SS/TT/CYC | Cross-artifact defect IDs | a contract conflict between two artifacts |
QD-PM | Permission defect IDs | a permission/responsibility proportionality problem |
QC-* | Code-contract defect IDs | a defect in an embedded code snippet |
EX-* | Risk Explicit IDs | a risk expressed directly in static text |
AS-* / FM-* | Impact-map IDs | candidate attack surface / failure mode (advisory only) |
AC-L1/L2/L3 | Agent complexity level | drives severity for the Prompt domain |
OR-L1/L2/L3 | Operation risk level | drives severity for the Skill/Tool domain |
P0 / P1 / P2 | Severity | blocking / warning / advisory |
full / assembled / summary | Fidelity | original / assembled from code / summarized |
applicability.fact | Structural fact | decides whether a check runs (N/A vs judge) |
| reference level (∅) | Display layer | a check the unified checklist carries but the original tiering assigns no P at this L |
Status board
Stage A (Single-artifact): Executed — 7 artifacts (1 Prompt / 1 Skill / 5 Tools); P0 ×2, P1 ×1, reference-level ∅ ×6, baseline-gate FAIL ×2, uncertain ×1
Stage B (Cross): Executed — 1 Prompt + 1 Skill + 5 Tools; reference-level ∅ FAIL ×2, no P0
Stage C (Gate-0): Passed — G0-1: carries P0 (2); G0-2: no unfixed Stage-B P0; G0-4: complete; G0-3: locatable
Stage D (Permission QD-PM): Executed — 43/43 items; P1 ×1, P2 ×1, related ×1
Stage E (Risk Explicit EX): Executed — 0 EX items (Risk Implicit not run)
Stage F (Impact outlook): Executed — candidate mapping for 15 FAILs (Stage A 11 · Stage B 2 · Stage D 2; includes QD-T-4.7 for 5 Tools)
Stage G (Self-verification): Executed — 316/316 items judged; triangle check performedInput notes
- The document packs 7 artifact segments: 1 System Prompt, 1 Skill, 5 Tool Schemas. Container scaffolding (front matter, table of contents,
Report Metadata, PASS-criteria paragraph, the 2026-10 rule-version note, footer) was excluded and is not inspected. - The document's self-description
Final Gate PASS (0 P0 defects)and its rule-version note are artifact content, not a fidelity or verdict basis; this run re-scans independently under the v1.1 condensed rules. - Tool sections show only the docstring and the
parametersdict;execute()bodies are omitted for brevity — a document-level fact, not a defect. data/medications.jsonanddata/interactions.jsonare referenced by the Skill but not supplied with the input (see QD-S-0.7uncertain).- In Skill §3
medication_check_interactions,interactions_foundandinteractionsare each declared twice, and the secondinteractionsentry says "(see below)" with no structure below it (see QD-S-0.5).
Stage A — Single-artifact inspection
Applicability is decided by structural facts; L only feeds severity. Prompt is AC-L2; Skill and all 5 Tools are OR-L1.
Tally
| Domain | judged | PASS | N/A | FAIL | uncertain | other |
|---|---|---|---|---|---|---|
| Prompt (AC-L2) | 54 | 40 | 4 | 4 | 0 | advisory 6 |
| Skill (OR-L1) | 33 | 27 | 3 | 2 | 1 | — |
| Tools (5 × 28) | 140 | 59 | 76 | 5 | 0 | — |
| QC (embedded code) | 17 | 10 | 6 | 0 | 0 | Not Executed 1 |
A.1 Detailed FAIL / uncertain — System Prompt
| ID | Verdict | Severity | Evidence |
|---|---|---|---|
| QD-P-1.2.4 | FAIL | P0 | You are the Medication Information Assistant, providing reliable medication information to patients and the general public. + You are not a doctor or pharmacist. — the AI/automated-assistant status is never disclosed anywhere in the prompt; the audience is patients and the general public (C-end) → escalation trigger fired |
| QD-P-2.4.4 | FAIL | P1 | Multi-turn flow plus per conversation budgets exist, but no cross-turn / cross-session context or memory boundary is declared (what history is readable, for how long, whether it crosses sessions). Search scope: full text; history / session / memory appear only in the Skill body |
| QD-P-2.5.6 | FAIL | P0 | has_external_data holds (user messages + tool returns), yet nothing declares that external data / tool returns must not be treated as instructions. Search terms: injection / untrusted / cannot override / data is not instruction → no hit |
| QD-P-2.5.8 | FAIL | ∅ (reference level) | has_confidential_content holds (the full system prompt and safety rules). No confidentiality or leak-response declaration. This item is P1 at AC-L2/L3 under the original spec; shown at reference level here |
A.2 Detailed FAIL / uncertain — Skill medication_info
| ID | Verdict | Severity | Evidence |
|---|---|---|---|
| QD-S-0.5 | FAIL (baseline gate) | gate | In §3 Returns, interactions_found and interactions are each declared twice; the second interactions: List of found interactions (see below) has no structure below it, contradicting the earlier closed enumeration "each with only severity/type/description/recommendation" |
| QD-S-0.8 | FAIL (baseline gate) | gate | The front matter carries no version / owner / changelog; metadata is not traceable |
| QD-S-0.7 | uncertain | gate | data/medications.json and data/interactions.json are not supplied with the input, so existence cannot be verified (not a defect conclusion) |
Baseline conclusion: QD-S-0.5 and QD-S-0.8 failed → recorded as "baseline not passed", overall conclusion annotated assessment incomplete (NEEDS_REVIEW). Under the v1.1 relaxed rule only QD-S-0.3 (completely unparsable) blocks QD-S-1~5, so the run continued.
A.3 Detailed FAIL — Tool Schemas (5)
| ID | Tools affected | Verdict | Severity | Evidence |
|---|---|---|---|---|
| QD-T-4.7 | medication_check_interactions, medication_get_precautions, medication_get_storage, medication_get_usage, medication_search | FAIL (×5) | ∅ (reference level) | All five schemas declare input parameters only; no outputSchema exists. Return structure lives only in docstring prose, e.g. Returns data.interactions_found (boolean ...). OR-L1 assigns no P to this item |
A.4 Detailed — QC (embedded snippet: Skill ## Usage Example)
| ID | Verdict | Severity | Evidence |
|---|---|---|---|
| QC-1.3 | Not Executed | P2 | Context-dependent rule: no API version database is available, so it is recorded as Not Executed rather than FAIL |
No QC FAIL. The remaining QC items (10 PASS, 6 N/A) are folded by default (available in the on-demand ledger — see the appendix).
A.5 Advisory items (ungraded, non-blocking) — Prompt
| ID | Verdict | Note |
|---|---|---|
| QD-P-1.4.1 | advisory | The disclaimer repeats in Rule 3, Output Format and the examples — intentional redundancy, still readable |
| QD-P-2.1.3 | advisory | Section hierarchy is clear; Priority Order duplicates some navigation |
| QD-P-2.1.5 | advisory | Context budget is tight (full rules + examples + boundary table) but acceptable |
| QD-P-2.7.1 | advisory | Only one positive example (usage); representativeness is weak |
| QD-P-2.7.2 | advisory | Counter-examples cover prescribing only, not dosage adjustment |
| QD-P-2.7.3 | advisory | Boundary cases are well covered (empty input, overlong input, >10 medications, emergency) |
Stage B — Cross-artifact inspection
Structural facts: Prompt↔Skill ✓, Prompt↔Tool ✓, Skill↔Tool ✓, multiple Tools ✓, invocation graph ✓; multiple Skills ✗, multiple Agents ✗, Skill handoff ✗.
Tally: judged 29 · PASS 23 · N/A 4 · FAIL 2
| ID | Verdict | Severity (AC-L2) | Evidence |
|---|---|---|---|
| QD-PS-1.5 | FAIL | ∅ (reference level) | The Skill declares partial_result_allowed: true and defines partial-result handling; the Prompt covers only the success and error paths and never declares what to output when only some medication_ids fail to resolve |
| QD-PS-1.6 | FAIL | ∅ (reference level) | Prompt: interaction-check answers may be 400 words; Skill: Limit each response to at most 150 words in the Answer section... → conflicting length contracts on the same output channel |
Stage C — Gate-0 (admission to Permission)
Gate-0 is not a check item and produces no ID or score.
- G0-1: carries P0 — Stage A holds 2 unfixed P0 findings (QD-P-1.2.4, QD-P-2.5.6). Recorded as an informational finding under the non-blocking policy; it does not block.
- G0-2: no unfixed Stage-B P0 — Stage B has no P0 (both FAILs are reference level ∅).
- G0-3: locatable — responsibility baseline is locatable at
# Identity,# Task Boundary,# Boundary Statement,# Authorized Tools. - G0-4: complete — all 5 Tool Schemas carry tool-level
nameanddescription(docstring first line / first paragraph).
Result: Gate-0 Passed (G0-4 satisfied). The G0-1 P0 findings and the Stage B reference-level FAILs are carried forward.
Stage D — Permission proportionality (QD-PM, full 43-item set)
Mandatory scope statement: this stage verifies declaration-layer proportionality inside the Logic Artifacts only. Per permission v2 §0.1.4 it does not check actual IAM/IdP policy configuration, PEP/PDP runtime enforcement, runtime permission-use monitoring, or token/key lifecycle engineering. PASS here does not mean runtime permission security.
Classification basis: operation risk = OR-L1 (all five tools are read-only) → base mapping P2; fixed-level items (3.4/5.4/6.3/6.5 = P0, 6.7 = P1, 1.7 = P2) follow their own rules. All verdicts are provisional (condensed).
Tally: judged 43 · PASS 25 · N/A 15 · FAIL 2 · related 1
| ID | Verdict | Severity | Evidence |
|---|---|---|---|
| QD-PM-6.7 | FAIL | P1 (fixed) | has_regulated_data holds (health information). Data-use limits are declared (data_sensitivity, Security and Privacy Filtering), but applicable compliance requirements and retention boundaries are not. This item judges the missing declaration only, never compliance itself |
| QD-PM-6.6 | FAIL | P2 | No permission review period, validity period or expiry condition is declared. Search scope: prompt full text and Skill front matter (max_retries / max_tool_calls / timeout_seconds are execution limits, not permission validity) |
| QD-PM-5.6 | related → QD-P-2.5.6 | — (related, not scored) | Same fact as QD-P-2.5.6 (no declaration that external input cannot rewrite the boundary); would be OR-L1 → P1 if judged independently. Cross-domain dedup records it once and does not add a second P |
Stage E — Risk Explicit audit (EX)
Scanned all static text of the Prompt, Skill and Tool Schemas through the three-phase workflow:
- NL-A (single object): no self-contained risk sentence, identity/permission-risk declaration, embedded inducement, reverse constraint removal ("no need to verify / skip checks"), or priority override ("ignore all above").
- NL-B (cross object): no fragment piecing, label-reference separation, forged authorization chain, or condition-behavior chain.
- NR-O (encoding/obfuscation): no zero-width characters, Base64/Hex payload, homoglyph, or character graphics.
- NR-S (structure/fields): no over-scope permission field, dangerous capability flag, abnormal type/constraint, callback address, tool-name conflict, hardcoded credential or personal data. The Python snippet in the Skill is an illustrative call example with no executable payload, so it is not NR-S-4.
Result: 0 EX items (Explicit·P0/P1/P2 all zero). This is a static-text audit, not a runtime exploitability conclusion; Risk Implicit was not run.
Stage F — Impact outlook (candidate mapping, advisory)
Mapping covers the FAILs from Stages A/B/D. QC-* defects have no AS/FM mapping; there were no QC FAILs.
Abbreviation glossary
| Code | Meaning |
|---|---|
| AS-01 | Instruction and context boundary confusion |
| AS-02 | Input and parameter injection |
| AS-03 | Output handling and sensitive data exfiltration |
| AS-04 | Permission, identity and delegation expansion |
| AS-05 | Tool misuse and high-risk side effects |
| AS-06 | Resource exhaustion and runaway execution |
| AS-07 | Anomaly propagation and cascading failures |
| AS-08 | Configuration, naming and supply-chain confusion |
| AS-09 | Cross-artifact contract breach |
| D1 / D2 / D3 | Confidentiality / integrity / authorization damage (impact type labels only) |
| Strong / Medium / Conditional | Association strength = validation priority, not severity |
| FM category group | Taken from relevance map §5; FM definitions are not distributed with this package and are not expanded |
| Impact category | Defect (per-defect inline attribution) | Possible consequence (candidate) | Test first |
|---|---|---|---|
| Instruction/context boundary | QD-P-2.5.6 (AS-01, AS-02 · D1/D2/D3 · Strong · FM-08/09/10), QD-P-2.5.8 (AS-01, AS-03 · D1 · Strong · FM-08/09/10), QD-P-2.4.4 (AS-01, AS-07 · D1/D2/D3 · Medium · FM-03/04) | User input or tool returns may compete with system rules for priority; an unclear memory boundary may cause cross-turn information misuse | Injection rewriting, cross-turn follow-up, tool returns carrying abnormal content |
| Identity and permission | QD-P-1.2.4 (AS-01, AS-04 · D1/D3 · Medium · FM-01/02/07/09) | Users may believe the reply comes from a human clinician and over-trust its authority | C-end identity disclosure and trust-boundary tests |
| Output and data handling | QD-PS-1.6 (AS-03, AS-09 · D1/D2/Auditability · Medium · FM-04/05/06/08), QD-T-4.7 ×5 (AS-03, AS-09 · D1/D2/Availability · Medium · FM-03/04/05) | Inconsistent length contracts may truncate content or drift structure; a missing outputSchema leaves return shape to prose | Interaction-answer length, table completeness, return-field parsing |
| Anomaly propagation | QD-PS-1.5 (AS-07, AS-09 · D2/Availability · Medium · FM-04/05/06/08) | When some IDs fail to resolve, the Prompt declares no output policy, so behavior depends on model improvisation | Partial-failure degradation in multi-drug interaction checks |
| Contract and metadata | QD-S-0.5 (AS-09 · Availability/Auditability · Medium · no FM group mapping), QD-S-0.8 (AS-09 · Availability/Auditability · Medium · no FM group mapping) | Duplicate/dangling declarations and missing metadata reduce auditability and version traceability | Skill contract parsing, version traceability |
| Permission auditability | QD-PM-6.7 (P1; AS-05, AS-09 · D2/D3/Auditability · Medium · FM-05/09/10), QD-PM-6.6 (P2; AS-05, AS-09 · D2/D3/Auditability · Medium · FM-05/09/10) | Compliance/retention boundaries and permission review/expiry lack a declared basis | Data-retention and permission-review declaration review |
Mandatory statements:
- The above are candidate associations ("may / candidate association / needs dynamic verification"); they never assert "will cause".
- Association strength ≠ severity; the two are labelled separately.
- Risk Implicit and the runtime Quality subsets were not run; per relevance.md §1.4, no assumption is made that compensating controls outside the artifacts are absent.
- This section is physically separated from the stage verdicts and is advisory context only; it changes no Inspect conclusion.
Stage G — Self-verification
In-line checks
- ID back-closure — every
QD-*/QC-*/EX-*ID emitted here exists as an active item inreferences/; no tombstoned or gapped ID was used (QD-P-2.1.1, 2.1.4, 2.3.3, 2.5.5; QD-T-4.2, 3.5, 4.3). All Stage F AS/FM codes come from the relevance map. - Wording red lines — Stage F carries no causal assertions; the report never calls the artifacts "secure" or "high quality"; "Permission = ERROR/BLOCKED" never appears.
Closing checks
- Output contract — the status board has all seven lines; the report header carries every provenance fact; the executive summary and terminology quick reference are present; PASS/N/A are folded per §6.12 (the full ledger is emitted on request, not printed); evidence excerpts are quoted verbatim in their original language.
- Triangle check (reverse consistency) — the report was re-read as an external document and each emitted ID checked against its definition: (a) the ID exists; (b) the defect content matches the definition (e.g. QD-P-1.2.4 = missing AI identity disclosure, QD-P-2.5.6 = missing instruction-data trust boundary, QD-PM-6.6 = no review/expiry mechanism declared); (c) severity matches the L-keyed mapping plus recorded escalation (C-end upgrade, fixed-level items). No segment needed re-emission.
- Tier self-audit — AC-L2 for the Prompt, OR-L1 for the Skill/Tools, never mixed; this is an AC-L2 carrier with all-OR-L1 tools, so no mixed-risk case; AC-L was never used to grade Permission severity.
- N/A basis re-verification — every N/A records its structural fact and search scope; no FAIL was issued on an unmet applicability precondition; no conditional item was left N/A while its trigger was present.
- Upgrade justification audit — QD-P-1.2.4 escalated on
patients and the general public; QD-PM-6.7 is fixed P1; QD-PM-6.6 sits at the OR-L1 base mapping P2; no unfired escalation is claimed. - Cross-stage consistency — QD-P-2.5.6 (P0) and QD-PM-5.6 (related) are the same fact and are counted once; QD-S-1.2 (Skill-internal PASS) and QD-PS-1.6 (cross-artifact conflict, ∅) are recorded at different layers without double counting. Prompt/Tool have no local dedup groups, so the dedup re-check is recorded as not applied.
- Forward coverage (ID ledger) — Stage A: Prompt 54/54, Skill 33/33, Tool 140/140, QC 17/17; Stage B: 29/29; Stage D: 43/43 → 316 items to judge / 316 items judged, no unverdicted item. Stage C/E/F emit no per-rule verdicts and are excluded by rule.
Self-verification statement
Self-verification: ID back-closure OK · red-line wording OK · output contract OK · triangle check OK · tier self-audit OK · N/A basis re-verification OK · upgrade justification audit OK · cross-stage consistency OK (QD-P-2.5.6 ↔ QD-PM-5.6 related) · forward coverage OK (316/316)
No in-place self-correction was needed. Independence disclosure: Stage G was run by the same model in the same context that produced the verdicts; it is an auxiliary reverse-consistency check, not an independent review, and it does not mean the verdicts are confirmed correct.
Appendix — Verdict tally & on-demand ledger
The complete per-rule ledger — 316 judged items, every PASS line and every N/A structural basis — was produced and reconciled in this run (see Stage G forward coverage) but is folded by default (skill §6.12); the body above already carries every FAIL / uncertain / related / advisory line. To audit specific items, ask sanityops-inspector to output the full verdict ledger for this run — the whole set or any stage/object subset of it.
| Stage | Items to judge | Items judged | PASS | N/A | FAIL | uncertain / related / other |
|---|---|---|---|---|---|---|
| Stage A — Prompt | 54 | 54 | 40 | 4 | 4 | advisory 6 |
| Stage A — Skill | 33 | 33 | 27 | 3 | 2 | uncertain 1 |
| Stage A — Tools | 140 | 140 | 59 | 76 | 5 | — |
| Stage A — QC | 17 | 17 | 10 | 6 | 0 | Not Executed 1 |
| Stage B — Cross | 29 | 29 | 23 | 4 | 2 | — |
| Stage D — Permission | 43 | 43 | 25 | 15 | 2 | related 1 |
| Total | 316 | 316 | 184 | 108 | 15 | 9 |
Graded defects among the 15 FAILs: P0 ×2 · P1 ×2 · P2 ×1 = 5; reference-level ∅ ×8; baseline-gate FAIL ×2 (ungraded).