logical-bug-finder
Generalized template for diagnosing complex logical patterns and bugs in unstructured codebases or texts.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generalized template for diagnosing complex logical patterns and bugs in unstructured codebases or texts.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Protocol for high-fidelity document consolidation and conceptual shifting, preventing lossy 'banal summarization'.
Use this skill when the user wants to analyze a YouTube video forensically using a .info.json (metadata + comments) and/or .en.srt (transcript) produced by yt-dlp. Covers any narrative video genre: scams, true crime, interviews, controversies, documentaries. Triggers include: any mention of .info.json or .en.srt files, requests to analyze YouTube comments, mine crowd reactions, run sentiment analysis, cluster topics, find narrative pivots in a transcript, or extract the video URL from a yt-dlp JSON. The skill covers two tiers: (1) quick forensics via jq/Python, and (2) full statistical analysis via pandas/sklearn/matplotlib. Do NOT use for general YouTube searches, video downloading, or tasks where no .info.json/.en.srt files are present.
A methodology for researching, drafting, and posting high-quality technical reports to GitHub repositories.
Sequential JSON-based workflow for accessing non-Termux files on Android using termux-saf-*.
Conceptual and operational master guide for interacting with Neo4j using MCP tools.
Procedural instructions on tunneling and exposing GH Codespaces over SSH/SFTP directly to Termux.
SOC 직업 분류 기준
| name | logical-bug-finder |
| description | Generalized template for diagnosing complex logical patterns and bugs in unstructured codebases or texts. |
This document provides a methodology for diagnosing a specific bug and then finding and fixing similar logical errors across a codebase. It is designed for "fuzzy" problems where the issue is not a simple keyword but a flawed pattern of logic that may be implemented in different ways across multiple files.
The goal is to move from a specific bug instance to an abstract, reusable heuristic. Don't just think about the specific filenames or variables; think about the role they play. This allows you to identify the same logical mistake even when the implementation details are different.
The process can be broken down into four distinct phases.
Before searching for anything, deeply understand the initial problem.
Location A, but a later step incorrectly tries to access it from Location B."Abstract the specific details from your hypothesis into a generic, flawed pattern. This is the most critical step for turning a one-off fix into a systemic search.
Identify the Conceptual Roles: Assign generic roles to the specific entities involved.
SCRIPT_TMPDIR=$(mktemp -d) becomes -> "A process step that initializes a context (e.g., a temporary workspace, a config variable, a resource handle)."ffmpeg becomes -> "A tool or function that operates within that context."transforms.trf becomes -> "An intermediate artifact or resource."Define the Flawed Pattern: Describe the bug using these abstract concepts. This is your heuristic.
Heuristic Example: A process initializes a required context (e.g., creates a temporary directory, sets a configuration variable), but a subsequent step within that process fails to use this context, instead relying on an incorrect default or hard-coded state.
With a clear heuristic, you can now search the codebase efficiently. Instead of manually reading every file, you pivot to a faceted search to find high-probability candidates.
mktemp command, a call to a create_config function). This first pass should dramatically narrow the number of relevant files.ffmpeg, process_data).Analyze the prioritized list of candidates to confirm the bug and apply the fix.
-result /tmp/file to the command."By following this Analyze -> Generalize -> Search -> Verify workflow, you can transform a vague, fuzzy bug-finding mission into a structured and repeatable engineering task.
It can also be used for other domains, e.g. below:
This document describes a method for identifying a specific flaw in a single text—logical, conceptual, stylistic, or formal—and then using that insight to locate and correct the same underlying error across an entire corpus. It is designed for fuzzy problems: cases where the issue is not a single forbidden word or rule violation, but a recurring failure of reasoning, perspective, or constraint management that manifests differently in different places.
The objective is to move from a concrete instance of failure to an abstract, reusable heuristic. Do not fixate on particular characters, quotations, page numbers, or phrases. Instead, identify the roles elements play in the error and the constraints that are being violated. This makes it possible to detect the same mistake even when it wears different linguistic costumes.
The process consists of four phases. Each phase builds discipline into what would otherwise be vague editorial intuition.
Before scanning the corpus, understand the first anomaly with surgical precision.
Start by identifying the symptom: what exactly feels wrong, inconsistent, or implausible. This might be an anachronism, a contradiction, a sudden shift in tone, a claim that undermines earlier premises, or a stylistic move that breaks the text’s own rules.
Next, isolate the clue that explains why it is wrong. This is usually a contrastive observation: the text behaves one way under condition X and another way under condition Y. For example, a narrator who is careful and precise elsewhere suddenly becomes sloppy, or a concept that is rigorously defined early on is later used loosely.
Then formulate a concrete hypothesis that explains the failure. Avoid vague judgments.
Bad: “The author made a mistake.” Good: “The author allows a character constrained by a historical setting to use concepts that presuppose later technological or cultural developments, violating the story’s temporal framework.”
The hypothesis must be precise enough that it could, in principle, be falsified.
This is the most important step. You now strip away local details and describe the error as a general pattern.
Begin by identifying abstract roles.
A named historical figure becomes “an agent bound to a specific temporal and cultural context.” A modern term becomes “a concept whose existence depends on later developments.” A paragraph of dialogue becomes “a site where an agent expresses internal models of the world.”
Once the roles are clear, define the flawed pattern in terms of violated constraints.
Heuristic example:
An agent operating under a defined contextual constraint (historical, epistemic, cultural, logical) expresses knowledge, language, or assumptions that presuppose conditions outside that constraint, without the text acknowledging or justifying the breach.
This heuristic is now independent of genre, author, or vocabulary. It can apply equally to historical fiction, philosophy, journalism, or academic prose.
Armed with a clear heuristic, you can now search efficiently instead of rereading everything.
You cannot search directly for “conceptual inconsistency.” Instead, you search for the components of the pattern.
First, locate instances of the strongest constraint-bearing element. This might be all passages involving historically fixed characters, all sections governed by a formal definition, or all claims derived from a stated premise.
Second, within those locations, search for the second component: expressions that could plausibly violate the constraint. These might include certain types of terminology, argumentative moves, metaphors, or assumptions.
Then intersect the results. The passages that satisfy both conditions are your highest-probability candidates. Items that match only one facet are lower priority, though still worth occasional inspection.
This is triage, not brute force.
Now you evaluate candidates one by one.
For each passage, ask whether it truly instantiates the heuristic.
Is the relevant constraint present? Does the passage introduce an element that depends on violating that constraint? Crucially, is the violation unacknowledged or unjustified, rather than deliberate (irony, satire, speculative framing)?
Only when the full pattern is present do you proceed to correction.
Corrections should be conceptual, not cosmetic.
Bad: “Replace the modern word with an older synonym.” Good: “Revise the passage so the agent’s language and assumptions remain consistent with the epistemic resources available within the defined context, or explicitly mark the deviation as intentional.”
The goal is not to patch a sentence, but to restore coherence to the system that produced it.
By following the sequence Analyze → Abstract → Search → Verify, you convert a vague sense that “something is off” into a disciplined analytical process. The method scales from a single essay to an entire library and trains both humans and machines to reason in terms of constraints, roles, and systemic patterns rather than isolated errors.
This is how local fixes become global understanding—and how intuition gets upgraded into method.