Skip to content
Development
Skill

/logic-locate

Locate the root cause of a CONFIRMED failure via backward-then-forward semi-formal tracing. Trigger when the user provides a stack trace, failing assertion, error message, or specific wrong-value observation — "find the bug", "this test is failing", "track down this crash", "why

From plugin
logic-lens
2511 skills3 agents6 commands1 hook

Claude Code

$ npx -y skills add hyhmrright/logic-lens --skill logic-locate --agent claude-code

SKILL.md

logic-locate.SKILL.md
name: logic-locate
description: >
  Locate the root cause of a CONFIRMED failure via backward-then-forward
  semi-formal tracing. Trigger when the user provides a stack trace,
  failing assertion, error message, or specific wrong-value observation
  — "find the bug", "this test is failing", "track down this crash",
  "why is this test failing", "KeyError at line 89", "expected 70, got
  100", "NoneType has no attribute X", "cart empties when second tab opens".
  SCOPE HARD RULE: requires a concrete failure (exception, failing test,
  or specific wrong output). Vague suspicion without evidence uses
  logic-review; behavior explanation uses logic-explain; refactor
  comparison uses logic-diff; codebase audit uses logic-health.
  Do NOT trigger for: vague "what's wrong" without a concrete symptom,
  style questions, or performance issues.

Logic-Lens — Fault Locate

Setup

Use lazy loading per `../_shared/common.md` §13: 1. Read `../_shared/common.md` only for language, Iron Law, Fault Confidence, scope routing, Remedy discipline, config fields, and loading budget. 2. Read only the relevant step in `logic-locate-guide.md` as you reach it. 3. Load `../_shared/logic-risks.md`, `../_shared/semiformal-guide.md`, `../_shared/semiformal-checklist.md`, and `../_shared/report-template.md` on demand when the current step needs them.

Process

**Step 0. Language + scope routing.** Detect language per `common.md` §1. Confirm a concrete failure exists (stack trace, failing assertion, specific wrong value). If only a suspicion, switch to logic-review.

**Step 1. Understand the failure** (guide Step 1) — observed behavior, expected behavior, reproduction path.

**Step 2. Identify the entry point** (guide Step 2) — failing test, outermost application frame, or request handler — whichever is closest to the failure. Stay inside the failure cone first: stack frames, failing test fixture, directly called local functions, and config/env values read on that path. Do not scan unrelated modules unless the trace crosses into them.

**Step 3. Trace backward from the failure point** (guide Step 3) — walk each value and state back to its origin, building premises at every hop.

**Step 4. Trace forward to confirm** (guide Step 4) — from the suspected root, verify the trace reaches the observed symptom.

**Step 5. Interprocedural tracing if a callee is implicated** (guide Step 5) — trace into the callee; check return values under observed conditions, unhandled exceptions, shared-state mutation. Apply the depth limit and Call-Chain Context Label format defined in `semiformal-guide.md` §Call-Chain Context Labels; at the limit, state the remaining callee path as a premise assumption and downgrade to **Medium confidence** (per `common.md` §7).

**Step 6. Identify the root divergence and classify** (guide Step 6) — state the exact line/expression, the violated premise, the actual behavior, the propagation chain to the symptom; pick the L-code.

**Step 7. Output the focused report** (guide Step 7) — Fault Confidence (High/Medium/Low, per `common.md` §7); Primary Fault (single five-field finding); optionally Contributing Factors; a minimal Remedy per `common.md` §10. **Format is mandatory even for simple one-function bugs: always emit the labeled Premises / Trace / Divergence / Trigger / Remedy fields and the Fault Confidence line. Never answer with a plain fix suggestion.**

**Mode line in report:** `Fault Locate` (Chinese: `故障定位`).

**Output format:** the Findings section has ONE Primary Fault, not a full Critical/Warning/Suggestion split. The Logic Score line is replaced by **Fault Confidence:** High / Medium / Low.

Read more
@hyhmrright
Ships withlogic-lens

Logic-first bug investigation for coding assistants: establish behavioral contracts, follow real callers and dependencies, trace failure paths, and report reproducible violations with evidence.

2511 skills3 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
25
Star history of hyhmrright/logic-lens on GitHub, a chart by star-history.com

Other skills on logic-lens.

bump-version

bump-version

Bump the Logic-Lens version across all six metadata locations at once (package.json, the four plugin manifests, and the README…

iterate-skill

iterate-skill

Run the Logic-Lens skill-improvement loop end to end — baseline → diagnose failures → edit → sync cache → re-eval → verify net…

new-skill

new-skill

Scaffold a new logic-* skill in the Logic-Lens repo and wire it into every place a skill must be registered, so no step is…

run-iteration-eval

run-iteration-eval

Run the Logic-Lens content-eval pipeline for one iteration and produce a scored summary.json — use to measure a skill change.…

sync-skill-cache

sync-skill-cache

Sync the Logic-Lens working-copy skills/ into the installed plugin cache so content-evals test the EDITED skill, not the last…

logic-diff

logic-diff

Compare two code versions for semantic equivalence via semi-formal tracing of both versions side-by-side. Trigger when the user…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about logic-locate.

Which coding agents can use logic-locate?
logic-locate installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.