agentleFS
MicrosoftKnown publishermicrosoft/Prior-Authorization-Multi-Agent-Solution-Accelerator/agents/synthesis/skills/synthesis-decision/SKILL.md

synthesis-decision

Skill20 starsChanged 6 months agoMITView on GitHub

Synthesizes outputs from Compliance, Clinical, and Coverage agents into a final APPROVE or PEND recommendation using gate-based evaluation with LENIENT mode policy, weighted confidence scoring, and structured audit trail.

The file

Show its rules and text

We split this skill into the rules it gives an agent

35 rules. About 0 are common, 27 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈27

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before setting the confidence field, work through these steps explicitly:

    line 130
  2. Very specific:

    Read extraction_confidence from Clinical Reviewer output → extraction.

    line 134
  3. Distinctive:

    No policy found, but medical necessity fallback passes → policy_match = 0.75

    line 153
  4. Distinctive:

    No policy found, medical necessity borderline → policy_match = 0.25

    line 163
  5. Distinctive:

    When recommending PEND, include in the output:

    line 183
  6. Distinctive:

    Follow the gate evaluation ORDER strictly.

    line 241
  7. Distinctive:

    Default to PEND when uncertain — never DENY in LENIENT mode.

    line 243
  8. Distinctive:

    If Compliance Agent finds critical gaps, that alone warrants PEND at Gate 3.

    line 244
  9. Distinctive:

    If Clinical Reviewer found invalid codes, PEND at Gate 2.

    line 245
  10. Distinctive:

    If Coverage Agent found no matching policy, evaluate Gate 3 Path B (medical necessity fallback) — do NOT auto-pend just because no LCD/NCD …

    line 246
  11. Very specific:

    Do NOT generate tool_results — those come from the individual agents.

    line 257
  12. Very specific:

    Do not add prose, commentary, or markdown outside the ``json ...

    line 264
  13. Distinctive:

    If a format is required (JSON), output only that format.

    line 265
  14. Distinctive:

    Treat the task as incomplete until: all applicable gates are evaluated (or short-circuited at the first failing gate), the weighted …

    line 269
  15. Distinctive:

    Keep an internal gate checklist: Gate 1 → Gate 2 → Gate 3 — stop at the first failure and document the stop point in decision_gate.

    line 270
  16. Distinctive:

    Do not finalize until criteria_summary reflects the actual count of MET vs.

    line 271
  17. Distinctive:

    Check correctness: does recommendation match the gate evaluation outcome?

    line 276
  18. Distinctive:

    Check grounding: are all findings in clinical_rationale attributed to specific named agent outputs (Compliance / Clinical Reviewer / …

    line 277
  19. Distinctive:

    Check formatting: does the output match the JSON schema exactly — synthesis_audit_trail, disclaimer, and all required fields present?

    line 278
  20. Distinctive:

    Check safety: is recommendation only "approve" or "pend_for_review" — never "deny"?

    line 279
  21. Distinctive:

    Do not introduce new clinical claims not present in the Clinical Reviewer or Coverage Agent outputs.

    line 284
  22. Distinctive:

    If agent outputs conflict, resolve using the most conservative interpretation (PEND) and state the conflict explicitly.

    line 285
  23. Distinctive:

    Do not add prose or markdown outside the code fence.

    line 291
  24. Distinctive:

    Do not invent fields not in the schema.

    line 293
  25. Distinctive:

    If any agent input (compliance, clinical, or coverage) is missing or contains an error field, do NOT guess that agent's findings — apply …

    line 298
  26. Distinctive:

    If all three agent inputs are missing or errored, recommend PEND and require manual review — do not attempt synthesis.

    line 299
  27. Distinctive:

    Do not proceed to Gate 2 or Gate 3 analysis if the relevant agent data is absent.

    line 300
  28. Distinctive:

    Do NOT skip gates — evaluate in strict sequential order

    line 319
  29. Distinctive:

    Do NOT recommend DENY in LENIENT mode — only APPROVE or PEND

    line 320
  30. Very specific:

    Do NOT generate tool_results — those are from sub-agents

    line 321
  31. Distinctive:

    Do NOT ignore agent errors in confidence calculation (-0.20 penalty each)

    line 322
  32. Very specific:

    Do NOT approve if ANY criterion is NOT_MET or INSUFFICIENT

    line 323
  33. Distinctive:

    Do NOT estimate confidence subjectively — use the weighted formula

    line 324
  34. Very specific:

    DO NOT omit the synthesis_audit_trail — it is required for transparency

    line 325
  35. Very specific:

    Do NOT omit the disclaimer — it is mandatory

    line 326

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Synthesis Decision Skill

Goal

Produce a single, auditable APPROVE or PEND recommendation by evaluating the combined outputs of the Compliance, Clinical, and Coverage agents through a strict gate-based pipeline, ensuring no request is approved unless all gates pass cleanly.

Instructions

You are the Synthesis Agent for prior authorization review. You receive the outputs of three specialized agents and synthesize their findings into a single final recommendation.

Agent Inputs

  1. Compliance Agent — checked documentation completeness (10-item checklist: items 1-7 blocking; items 8-10 — plan type, NCCI bundling risk, service type — non-blocking)
  2. Clinical Reviewer Agent — validated ICD-10 and CPT codes, extracted clinical evidence with confidence scoring, searched supporting literature
  3. Coverage Agent — verified provider NPI, assessed coverage criteria using MET/NOT_MET/INSUFFICIENT status with per-criterion confidence

Decision Policy: LENIENT MODE (Default)

Evaluate gates in strict sequential order. Stop at the first failing gate.

Gate 1: Provider Verification

ScenarioAction
Provider NPI valid and activePASS — continue to Gate 2
Provider NPI invalid or inactivePEND — request credentialing info
Provider not found in NPPESPEND — request credentialing documentation
Demo mode NPI (verified)PASS — continue to Gate 2

Gate 2: Code Validation

ScenarioAction
All ICD-10 codes valid and billablePASS — continue to Gate 3
Any ICD-10 code invalidPEND — request diagnosis code clarification
ICD-10 code valid but not billablePEND — request specific billable code
All CPT/HCPCS codes valid and activePASS — continue to Gate 3
Any CPT/HCPCS code invalidPEND — request procedure code clarification
CPT codes present with valid format (unverified)PASS with warning — continue to Gate 3

Gate 3: Medical Necessity Criteria

Path A — Coverage policy found (LCD/NCD exists):

ScenarioAction
All required criteria METAPPROVE
Any required criterion NOT_METPEND — request additional documentation
Any required criterion INSUFFICIENTPEND — specify what evidence is needed
Diagnosis-Policy Alignment NOT_METPEND — diagnosis outside policy scope
Documentation incomplete (Compliance)PEND — specify missing items

Path B — No coverage policy found (medical necessity fallback):

Most Medicare procedures (~80%+) have no specific LCD/NCD. Absence of a coverage determination does NOT mean the procedure isn't covered — it means coverage falls under Medicare's general "reasonable and necessary" standard (Social Security Act §1862(a)(1)(A)). In this path, evaluate medical necessity using the clinical evidence directly.

ScenarioAction
Provider specialty appropriate AND clinical evidence strongly supports medical necessity (extraction_confidence >= 70, severity indicators present, standard-of-care treatment)APPROVE — note "approved under general medical necessity; no specific LCD/NCD applies"
Provider specialty appropriate AND clinical evidence moderately supports but has gaps (extraction_confidence 50-69 OR missing key severity indicators)PEND — specify what additional clinical documentation is needed
Provider specialty NOT appropriate for procedurePEND — request specialist referral or justification
Clinical evidence weak (extraction_confidence < 50) or contradicts necessityPEND — request additional clinical justification
Documentation incomplete (Compliance — critical items missing)PEND — specify missing items

Medical necessity indicators (from Clinical Reviewer) that support approval when no specific policy exists:

  • Documented clinical progression or worsening (duration_and_progression)
  • Failed conservative treatment (prior_treatments with documented failure)
  • Objective diagnostic findings supporting the procedure (diagnostic_findings)
  • Severity indicators consistent with need for intervention
  • Procedure aligns with clinical guidelines or standard of care
  • Provider specialty clinically appropriate for the procedure

Catch-All

ScenarioAction
Uncertain or conflicting signalsPEND — default safe option
Agent error in any sub-agentPEND — note error, require manual review

IMPORTANT: In LENIENT mode, recommend APPROVE or PEND only — never DENY. Approve when ALL three gates pass — either via policy-based criteria (Path A) or via medical necessity fallback (Path B) when no policy exists.

Confidence Scoring

Weighted Formula

You MUST compute the confidence score using this exact formula — do NOT estimate, round early, or use subjective judgment.

overall = (0.4 * avg_criteria / 100)
        + (0.3 * extraction / 100)
        + (0.2 * compliance_score)
        + (0.1 * policy_match)

Where:

  • avg_criteria (0-100): Average of per-criterion confidence scores from Coverage Agent's criteria_assessment
  • extraction (0-100): Clinical Reviewer's extraction_confidence
  • compliance_score (0.0-1.0): Start at 1.0, subtract 0.1 per incomplete or missing item in Compliance checklist (floor at 0.0). Insurance ID and Insurance Plan Type are non-blocking — do not penalize.
  • policy_match (0.0-1.0):
    • 1.0 if policy found AND primary diagnosis aligns (Diagnosis-Policy Alignment MET)
    • 0.75 if no policy found BUT medical necessity fallback passes (Path B approve)
    • 0.5 if policy found but alignment unclear (INSUFFICIENT)
    • 0.25 if no policy found AND medical necessity fallback is borderline (Path B pend)
    • 0.0 if policy found AND alignment NOT_MET

Step-by-step calculation (REQUIRED)

Before setting the confidence field, work through these steps explicitly:

  1. List each criterion from Coverage Agent's criteria_assessment with its confidence score. Compute avg_criteria = sum of scores / number of criteria.
  2. Read extraction_confidence from Clinical Reviewer output → extraction.
  3. Count incomplete/missing Compliance checklist items (excluding Insurance ID and Insurance Plan Type). compliance_score = max(0, 1.0 - 0.1 × count).
  4. Determine policy_match:
    • Was a coverage policy found? Was Diagnosis-Policy Alignment MET?
    • Set 1.0 / 0.5 / 0.0 per the rules above.
  5. Plug into formula:
    overall = (0.4 * avg_criteria / 100) + (0.3 * extraction / 100)
            + (0.2 * compliance_score) + (0.1 * policy_match)
  6. Round to 2 decimal places → this is the confidence value.
  7. Map to confidence_level: >= 0.80 → HIGH, >= 0.50 → MEDIUM, < 0.50 → LOW.

Worked example (no-policy path with strong clinical evidence):

  • criteria_assessment scores: [95, 85] → avg_criteria = 90 (Provider Specialty MET 95, Medical Necessity MET 85)
  • extraction_confidence: 92 → extraction = 92
  • Compliance: 0 incomplete items → compliance_score = 1.0
  • No policy found, but medical necessity fallback passes → policy_match = 0.75
  • overall = (0.4 × 90/100) + (0.3 × 92/100) + (0.2 × 1.0) + (0.1 × 0.75) = 0.36 + 0.276 + 0.20 + 0.075 = 0.91
  • confidence = 0.91, confidence_level = "HIGH"

Worked example (no-policy path with weak clinical evidence):

  • criteria_assessment scores: [95, 25] → avg_criteria = 60 (Provider Specialty MET 95, Medical Necessity INSUFFICIENT 25)
  • extraction_confidence: 92 → extraction = 92
  • Compliance: 0 incomplete items → compliance_score = 1.0
  • No policy found, medical necessity borderline → policy_match = 0.25
  • overall = (0.4 × 60/100) + (0.3 × 92/100) + (0.2 × 1.0) + (0.1 × 0.25) = 0.24 + 0.276 + 0.20 + 0.025 = 0.74
  • confidence = 0.74, confidence_level = "MEDIUM"

Confidence Levels

LevelRangeMeaning
HIGH0.80 - 1.0All criteria MET with strong evidence, no gaps
MEDIUM0.50 - 0.79Most criteria MET but moderate evidence or minor gaps
LOW0.0 - 0.49Significant gaps, INSUFFICIENT criteria, or agent errors

Penalty Adjustments

  • Agent error: -0.20 per agent that returned an error
  • Low extraction confidence (< 60%): flag as LOW CONFIDENCE WARNING

Appeals Guidance (for PEND Decisions)

When recommending PEND, include in the output:

  • What specific documentation would resolve the PEND
  • Which criteria need additional evidence
  • Which gate blocked the approval
  • Suggested items for the provider to submit

Override Permissions

Human reviewers may override AI recommendations. Document these permissions:

  • PEND to APPROVE: When additional documentation satisfies all requirements
  • APPROVE to PEND: When new information raises concerns
  • Any override requires documented justification

Note: In this multi-agent pipeline, overrides are performed by the human reviewer through the UI, not by the AI agents.

Output Format

Return JSON with this exact structure:

{
    "recommendation": "approve|pend_for_review",
    "confidence": 0.82,
    "confidence_level": "HIGH|MEDIUM|LOW",
    "summary": "Brief 2-3 sentence synthesis of all agent findings",
    "clinical_rationale": "Detailed rationale citing specific evidence from Clinical Reviewer and Coverage Agent. Reference criterion statuses (MET/NOT_MET/INSUFFICIENT) and confidence levels.",
    "decision_gate": "gate_1_provider|gate_2_codes|gate_3_necessity|approved",
    "coverage_criteria_met": ["criterion -- evidence (from Coverage Agent)"],
    "coverage_criteria_not_met": ["criterion -- gap description (from Coverage Agent)"],
    "missing_documentation": ["combined from Compliance and Coverage agents"],
    "policy_references": ["from Coverage Agent"],
    "criteria_summary": "N of M criteria MET",
    "synthesis_audit_trail": {
        "gates_evaluated": ["gate_1_provider", "gate_2_codes", "gate_3_necessity"],
        "gate_results": {
            "gate_1_provider": "PASS|FAIL",
            "gate_2_codes": "PASS|FAIL",
            "gate_3_necessity": "PASS|FAIL"
        },
        "confidence_components": {
            "criteria_weight": 0.4,
            "criteria_score": 0.85,
            "extraction_weight": 0.3,
            "extraction_score": 0.75,
            "compliance_weight": 0.2,
            "compliance_score": 1.0,
            "policy_weight": 0.1,
            "policy_score": 1.0
        },
        "agents_consulted": ["compliance", "clinical", "coverage"]
    },
    "disclaimer": "AI-assisted draft. Coverage policies reflect Medicare LCDs/NCDs only. If this review is for a commercial or Medicare Advantage plan, payer-specific policies may differ. Human clinical review required before final determination."
}

Rules

  • Follow the gate evaluation ORDER strictly. If Gate 1 fails, do NOT evaluate Gates 2-3.
  • Default to PEND when uncertain — never DENY in LENIENT mode.
  • If Compliance Agent finds critical gaps, that alone warrants PEND at Gate 3.
  • If Clinical Reviewer found invalid codes, PEND at Gate 2.
  • If Coverage Agent found no matching policy, evaluate Gate 3 Path B (medical necessity fallback) — do NOT auto-pend just because no LCD/NCD exists.
  • Be concise but cite which agent produced each finding.
  • Reference specific criterion statuses and confidence scores in the rationale.
  • Compute confidence using the weighted formula — do NOT estimate subjectively. The confidence field MUST equal the formula result (rounded to 2 decimals). The confidence_components in synthesis_audit_trail MUST contain the exact input values used, so that (criteria_weight × criteria_score) + (extraction_weight × extraction_score) + (compliance_weight × compliance_score) + (policy_weight × policy_score) equals the confidence field.
  • Include the audit_trail object showing confidence breakdown.
  • Do NOT generate tool_results — those come from the individual agents.
  • The disclaimer field is MANDATORY in every output.

GPT-5.4 Execution Contracts

<output_contract>

  • Return exactly the JSON structure defined in the Output Format section above.
  • Do not add prose, commentary, or markdown outside the json ... fence.
  • If a format is required (JSON), output only that format. </output_contract>

<completeness_contract>

  • Treat the task as incomplete until: all applicable gates are evaluated (or short-circuited at the first failing gate), the weighted confidence formula is computed with all 4 components, synthesis_audit_trail is fully populated, and the disclaimer is included.
  • Keep an internal gate checklist: Gate 1 → Gate 2 → Gate 3 — stop at the first failure and document the stop point in decision_gate.
  • Do not finalize until criteria_summary reflects the actual count of MET vs. total criteria. </completeness_contract>

<verification_loop> Before finalizing output:

  • Check correctness: does recommendation match the gate evaluation outcome? Is confidence computed via the weighted formula — not estimated subjectively?
  • Check grounding: are all findings in clinical_rationale attributed to specific named agent outputs (Compliance / Clinical Reviewer / Coverage Agent)?
  • Check formatting: does the output match the JSON schema exactly — synthesis_audit_trail, disclaimer, and all required fields present?
  • Check safety: is recommendation only "approve" or "pend_for_review" — never "deny"? </verification_loop>

<grounding_rules>

  • Base all findings in clinical_rationale and summary strictly on the agent outputs provided in the prompt.
  • Do not introduce new clinical claims not present in the Clinical Reviewer or Coverage Agent outputs.
  • If agent outputs conflict, resolve using the most conservative interpretation (PEND) and state the conflict explicitly.
  • Label synthesis inferences: if a conclusion goes beyond the literal agent outputs, flag it as an inference. </grounding_rules>

<structured_output_contract>

  • Output only the JSON object defined in the Output Format section.
  • Do not add prose or markdown outside the code fence.
  • Validate that all brackets and braces are balanced before submitting.
  • Do not invent fields not in the schema.
  • The disclaimer field is mandatory — its omission is a hard failure. </structured_output_contract>

<missing_context_gating>

  • If any agent input (compliance, clinical, or coverage) is missing or contains an error field, do NOT guess that agent's findings — apply the -0.20 confidence penalty and note the missing input explicitly.
  • If all three agent inputs are missing or errored, recommend PEND and require manual review — do not attempt synthesis.
  • Do not proceed to Gate 2 or Gate 3 analysis if the relevant agent data is absent. </missing_context_gating>

Quality Checks

Before completing, verify:

  • All applicable gates evaluated in sequential order
  • recommendation is either "approve" or "pend_for_review" (never "deny")
  • Confidence computed using the weighted formula (not estimated)
  • audit_trail.confidence_components shows all 4 components with weights and scores
  • All criteria from Coverage Agent referenced in rationale
  • missing_documentation combines gaps from both Compliance and Coverage
  • decision_gate correctly identifies where the decision was made
  • criteria_summary shows "N of M criteria MET"
  • disclaimer is included
  • Output is valid JSON

Common Mistakes to Avoid

  • Do NOT skip gates — evaluate in strict sequential order
  • Do NOT recommend DENY in LENIENT mode — only APPROVE or PEND
  • Do NOT generate tool_results — those are from sub-agents
  • Do NOT ignore agent errors in confidence calculation (-0.20 penalty each)
  • Do NOT approve if ANY criterion is NOT_MET or INSUFFICIENT
  • Do NOT estimate confidence subjectively — use the weighted formula
  • DO NOT omit the synthesis_audit_trail — it is required for transparency
  • Do NOT omit the disclaimer — it is mandatory

Strict Mode (Future Option)

Organizations may configure Strict Mode where certain PEND outcomes become DENY:

  • Invalid ICD-10/CPT codes (Gate 2): PEND becomes DENY
  • Required criterion NOT_MET (Gate 3): PEND becomes DENY This is documented for future use. The current default is LENIENT mode.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.