skill-call-diagnose
Skill Call Diagnose
Leading word: the trace — the session log under diagnosis, delivered by /skill:skill-call-extract as a trace file plus trace index. Every finding cites trace entries ([31], [37]) as evidence; a finding with no entry index is an opinion, not a finding.
The skill under diagnosis is the target skill; its SKILL.md and referenced docs are the ground truth for Adherence. Three axes run as parallel fresh-context sub-agents (they never pollute each other), each reporting under 400 words:
- Adherence — did the agent follow the target skill's documented workflow?
- Friction — where did execution stutter: failures, retries, re-emissions, cache collapse, stalls?
- Sedimentation — what did the agent improvise (inline scripts, repeated logic) that the target skill should absorb?
Findings do not end in the report: step 5.5 increment-merges them into the persistent wiki (~/skills/wiki/<target-skill>/ — patterns, run logs, and a proposal ledger that also records rejected proposals). The next diagnosis starts from that wiki; skill edits are gated against it.
Process
1. Resolve inputs
Two things: the target skill name (as in its frontmatter — required, ask if absent) and the trace (a session file path, or a session id / bare skill name when /skill:skill-call-extract has not run yet).
If no trace is in hand, get one: run the extract skill's script from its installed location (~/.pi/agent/skills/skill-call-extract/scripts/find-skill-sessions.py) — marker search for a bare skill name, --session <id> for an explicit id — and follow its triage flow. If the user already ran /skill:skill-call-extract, take its deliverables directly.