| 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... |
| risk | unknown |
| source | https://github.com/hyhmrright/logic-lens/tree/main/skills/logic-locate |
| source_repo | hyhmrright/logic-lens |
| source_type | community |
| date_added | 2026-07-01T00:00:00.000Z |
| license | MIT |
| license_source | https://github.com/hyhmrright/logic-lens/blob/main/LICENSE |
Logic-Lens — Fault Locate
When to Use
Use this skill when you need 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...
Setup
Use lazy loading per ../_shared/common.md §13:
- Read
../_shared/common.md only for language, Iron Law, Fault Confidence, scope routing, Remedy discipline, config fields, and loading budget.
- Read only the relevant step in
logic-locate-guide.md as you reach it.
- 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.