captainphantasy/floyd-v5/viterbi-resolver

Claude Code and agent skill by captainphantasy/floyd-v5

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Resolves ambiguous code by computing the most probable correct interpretation using structural context and type constraints

Install

npx vskill@latest install captainphantasy/floyd-v5/viterbi-resolver

SKILL.md

The same SKILL.md was published earlier as captainphantasy/floyd-v5/viterbi-resolver.

Viterbi Resolver

Resolves ambiguous code by computing the most probable correct interpretation using structural context and type constraints.

When to Use

  • WHEN mode=DEBUG and an LLM-generated code patch contains ambiguous type usage or unclear function calls
  • WHEN mode=BUILD and a code completion or suggestion needs disambiguation between overloaded symbols
  • WHEN a merge conflict has multiple valid resolutions and the best one must be selected

Actions

'resolve' | 'rank' | 'apply'

Parameters

ParameterTypeRequiredDescription
ambiguous_codestringyesThe code snippet containing ambiguity
candidatesstring[]noPossible resolutions to evaluate (if known)
context_filestringnoFile path providing surrounding type/function context
languagestringnoProgramming language for type-aware analysis (default: auto-detect)

Execution Pipeline

Step 1: Extract Context

Use view to read context_file if provided. Use grep to find the types and function signatures referenced in ambiguous_code. Use list_symbols on relevant files to enumerate available overloads or matching names.

Step 2: Rank Candidates

For each candidate (or each discovered overload), score it against:

  1. Type compatibility — do the argument types match the signature?
  2. Surrounding usage — how are the same symbols used in nearby code?
  3. Import presence — is the required module imported?

If candidates is empty, generate candidates from the symbol table discovered in Step 1.

Step 3: Apply

Return the highest-scoring resolution. If the scores are within 10% of each other, flag as ambiguous and return both options with explanations.

Output Shape

json
{
"ambiguous_code": "string — the original input",
"resolution": "string — the most probable correct code",
"confidence": 0.92,
"candidates_evaluated": [
{
"code": "string — candidate resolution",
"score": 0.92,
"reason": "string — why this scored highest"
}
],
"flags": ["string — warnings if confidence is low"]
}

Failure Modes

  • IF no candidates can be discovered: return the original code with a note that context is insufficient
  • IF multiple candidates tie within 10%: return all tied candidates and recommend human review

Examples

json
{
"action": "resolve",
"ambiguous_code": "result := process(data)",
"context_file": "internal/engine/pipeline.go",
"language": "go"
}

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/captainphantasy/floyd-v5/viterbi-resolver/badge)](https://verified-skill.com/skills/captainphantasy/floyd-v5/viterbi-resolver)

Something wrong with this skill or its page? Tell us.