TP4 reports a declared workflow's supporting code examples as description-behavior mismatches, at HIGH, and anchors every finding at SKILL.md:1
Summary
Since #419 / #421 TP4 evaluates each accepted executable fence in SKILL.md and references/*.md as its own candidate against the skill's full description. On a documentation-only skill whose description covers briefings and whose body shows the delivery step of that workflow (render the briefing to PDF, check the deep links in the EPUB), the model reports each of those fences as "a materially different primary purpose", lists the absence of other declared capabilities as the mismatched capabilities ("No evidence of querying videos"), and emits HIGH at confidence 0.98-0.99. In both captured runs per skill, the same fences fired, the meta-review recorded disagreed on every one, and those TP4 points alone put two skills above the DO_NOT_INSTALL line.
Separately, _tp4_finding hardcodes file="SKILL.md" with no line, so a finding on references/briefing-authoring.md:27-28 is reported at SKILL.md:1; the real coordinates exist only in evidence.
Environment
- SkillSpector 2.12.0 (
uv tool install), commit8180a36b6cdced2f3471f8cf99aed84fd13d8164per the report metadata. Windows 11, Python 3.12. - Provider
nv_buildresolved toopenai, modelgpt-5.4-2026-03-05, provider defaults (llm_provenance.determinism.classification = nondeterministic). - Skills:
skills/video-intelandskills/video-intel-searchat https://github.com/dzivkovi/video-intel/tree/a343cf7 . Markdown-only, no executable scripts in the skill directories.video-intel/SKILL.mdhas 20bashfences,video-intel-search/SKILL.mdhas 6. - Note: the
video-intelscan reportsanalysis_completeness = partial(1 of 2 components fully inspected), so the lower counterfactual scores below show the band change, not that the skill is clean.
Reproduction
skillspector scan skills/video-intel --format json > video-intel.json
skillspector scan skills/video-intel-search --format json > video-intel-search.json
Two runs each. The JSON reports, a --no-llm run per skill, and the script that recomputes the score from the installed formula are attached (see the bottom). -o FILE exits 2 on Windows ("Safe file output is unsupported on this platform"), so stdout redirection was used.
Observed
Both captured runs per skill flagged the same fences:
| skill | fence (real location, from evidence) |
what the fence does | TP4 finding | meta-review |
|---|---|---|---|---|
| video-intel | SKILL.md:697 |
python scripts/markdown_pdf.py _briefings/<topic>/<file>.md ...pdf, under a briefing-authoring step |
HIGH 0.99: "but code also performs: Markdown-to-PDF export of briefing files, Briefing document rendering/output generation unrelated to video ingestion or corpus curation" | disagreed 0.91 / 0.91 |
| video-intel | references/briefing-authoring.md:27-28 |
unzip -q -o out.epub -d _chk then a grep ... | wc -l that counts timestamped YouTube links, under "Deep links" / "Verify after building" |
HIGH 0.98-0.99: "Processes an EPUB/archive file rather than operating on the configured video corpus ... Does n[ot]..." | disagreed 0.97 / 0.88 |
| video-intel-search | SKILL.md:314 |
pytest tests/evals/test_search_quality.py -v -s, under "Evaluate Search Quality" |
HIGH 0.99: "Runs automated tests/evaluations instead of providing corpus search functionality, No evidence of querying videos, transcripts, concepts, quotes, corpus status, or profile data, No implementation of the described nugget synthesis/save behavior" | disagreed 0.92 / 0.91 |
The video-intel description explicitly lists briefings ("build me a briefing on [topic]"), and the body ties the PDF render and the EPUB link check to delivering that briefing. The video-intel-search description does not mention evaluation; the pytest line sits in a developer-facing section, so that example is more contestable than the other two. In all three, the model's mismatched_capabilities items are statements about what the snippet does not do, not an undeclared capability it has.
Score effect. Scores were recomputed independently from the installed formula (_SEVERITY_POINTS, per-rule diminishing weights 1.0 / 0.5 / 0.25, times confidence) and match the reports exactly:
| skill | run | reported score / verdict | TP4 points (all disagreed) |
score without the TP4 findings |
|---|---|---|---|---|
| video-intel | 1 | 67 HIGH DO_NOT_INSTALL | 37.000 | 30 MEDIUM CAUTION |
| video-intel | 2 | 72 HIGH DO_NOT_INSTALL | 37.125 | 35 MEDIUM CAUTION |
| video-intel-search | 1 | 66 HIGH DO_NOT_INSTALL | 24.75 | 41 MEDIUM CAUTION |
| video-intel-search | 2 | 56 HIGH DO_NOT_INSTALL | 24.75 | 32 MEDIUM CAUTION |
--no-llm scores: 8 and 22. translate-bcs (3 fences) produced no TP4 finding in either run.
Cause
- Each accepted executable fence is a separate
_TP4Candidate(mcp_tool_poisoning.py_iter_tp4_markdown_fences, used at ~1496), subject to chunking and the batch budget. That is the #421 design and is not the complaint; the complaint is what the prompt lets the model conclude from one fence. _TP4_PROMPT_SUFFIXflags "a materially different primary purpose" and exempts "supporting implementation details", but says nothing about partial snippets: it does not state that a chunk implementing one declared step is not a mismatch, and nothing requires amismatched_capabilitiesentry to be something the code does. The supporting-detail exemption did not stop these responses from treating absent functionality as mismatch evidence._tp4_findingsetsseverity="HIGH" if result.confidence >= 0.7 else "MEDIUM". The README pattern table lists TP4 as MEDIUM. All six TP4 findings in these four reports are HIGH; the code also permits MEDIUM for confidence 0.5 to below 0.7._tp4_findingbuilds the finding withfile="SKILL.md"and nostart_line, so the report showsLocation: SKILL.md:1for every TP4 hit, including the one inreferences/briefing-authoring.md. The meta-review formatter does not passevidence, so the reviewer also never sees the real coordinates.
All six captured TP4 findings carry llm_review_outcome=disagreed. That corroborates inconsistent model judgments on the same input; it does not by itself adjudicate which model is right. How disputed LLM findings should affect the score is a separate question and is left out of this report.
Expected
- The prompt should say that a chunk implementing only part of the declared functionality is not a mismatch, and that a mismatch needs affirmative evidence under the existing criteria: an undeclared capability the code performs, or an unrelated primary purpose, resource, or trigger. Absence of other declared functionality from a partial snippet should not suffice. A cheap guard: when every
mismatched_capabilitiesitem is phrased as an absence, do not emit. - Carry bounded surrounding Markdown (the heading and the prose before the fence) into the prompt, so the model can see that
markdown_pdf.pyruns under the briefing workflow. This is #668's request; the difference here is the partial-snippet criterion, which applies even when context is present. - Report the real file and line of the TP4 finding (from
evidence.code_path/code_start_line), notSKILL.md:1. - Align TP4's severity with the README, or document the escalation to HIGH at confidence >= 0.7.
Relevant code
src/skillspector/nodes/analyzers/mcp_tool_poisoning.py:_TP4_PROMPT_PREFIX/_TP4_PROMPT_SUFFIX,_iter_tp4_markdown_fences,_tp4_finding(severity,file="SKILL.md").src/skillspector/nodes/meta_analyzer.py: the batch formatter that omitsevidence.- README pattern table row for TP4.
Related
#419 / #421 (TP4 reads Markdown fences; this is a precision cost of that change), #668 (TP4 loses surrounding context), #982 (documentation-only skill forced to DO_NOT_INSTALL by scanner-side findings).
Attachments
Evidence gist: https://gist.github.com/dzivkovi/3d86e44a3d929563b1b97018be6b9658 (the nine JSON reports, analyze.py, analysis.txt). Run python -I analyze.py . in a folder holding the JSON files to reproduce the score table.
I can take this. I will open a PR addressing the TP4 false positives on declared workflow fences, the file and line anchoring, and the severity alignment.