This prompt is designed for DevSecOps engineers, platform teams, and technical leads who receive raw, high-volume linter or static analysis output and need to turn it into an actionable work queue. The core job is triage and prioritization, not remediation. Use it when you have a dump of findings from one or more tools—ESLint, Pylint, Semgrep, Checkstyle, or similar—and you need a deduplicated, severity-ranked, and categorized list that a team can actually act on. The prompt expects you to provide the raw lint output, your team's severity taxonomy, and any known false-positive patterns or suppression rules. It does not assume a specific language or tool, but it does assume the findings are already in a parseable text format.
Prompt
Linter Output Triage and Prioritization Prompt Template

When to Use This Prompt
Define the job, reader, and constraints for the Linter Output Triage and Prioritization prompt.
Do not use this prompt when you need a code fix, a security exploit proof-of-concept, or a deep root-cause analysis of a single finding. Those are separate workflows covered by sibling playbooks like Context-Aware Lint Fix Suggestion or Security Linter Finding Remediation. This prompt is also not a replacement for a linting dashboard or a CI quality gate; it is a human-readable prioritization aid that should feed into your backlog, not make automated pass/fail decisions. If you need a machine-readable decision, use the Code Quality Gate Pass/Fail Decision prompt instead. The output here is structured for human review and sprint planning, not for direct CI integration.
Before using this prompt, gather the raw linter output, your team's agreed severity definitions (what constitutes Critical, High, Medium, Low), any known false-positive signatures or file paths to suppress, and the target audience for the triage report (e.g., a specific squad, a security team, or a cross-functional review board). The prompt works best when you include these as explicit [CONSTRAINTS] and [CONTEXT] blocks. After running the prompt, validate the output against the eval checks described in the full playbook: correct severity mapping, deduplication accuracy, false-positive flagging, and owner assignment reasonableness. If the output will drive sprint commitments, have a human reviewer spot-check at least 10% of the prioritized findings before accepting the triage.
Use Case Fit
Where the Linter Output Triage and Prioritization prompt works well and where it introduces risk. Use these cards to decide if this prompt fits your workflow before wiring it into a CI pipeline or review tool.
Good Fit: Polyglot Monorepo Triage
Use when: you run multiple linters (ESLint, Pylint, ShellCheck) across a monorepo and need a single prioritized list. Why it works: the prompt normalizes severity, deduplicates cross-tool findings, and assigns owner teams by file path. Guardrail: validate that the normalized severity mapping matches your internal policy before sending results to developer inboxes.
Bad Fit: Real-Time IDE Feedback
Avoid when: latency must be under 500ms for in-editor squiggles. Why it fails: LLM triage adds seconds of latency and is nondeterministic. Guardrail: use deterministic rule engines for IDE feedback and reserve this prompt for batch CI or nightly scans where latency is acceptable and prioritization adds value.
Required Inputs
Minimum inputs: raw linter output (any format), repository file tree, and team ownership map. Strongly recommended: historical suppression baselines, severity override policy, and a list of known false-positive patterns. Guardrail: if the ownership map is stale, the prompt will misroute findings. Validate ownership data freshness before each run.
Operational Risk: Severity Inflation
What to watch: the model may upgrade medium findings to high severity to appear thorough, causing alert fatigue. Guardrail: enforce a severity override policy in the prompt constraints and post-process output to cap severity at the original linter level unless explicit override rules are matched. Log every severity change for audit.
Operational Risk: Deduplication Errors
What to watch: the model may merge distinct findings that share a line number or fail to merge identical findings from different linters. Guardrail: include a deduplication key schema (file + rule ID + line range) in the output contract and run a deterministic post-check that no two findings share the same key. Flag mismatches for human review.
Operational Risk: False-Positive Blind Spots
What to watch: the model may fail to flag a known false-positive pattern and treat it as a real finding, wasting developer time. Guardrail: preload a list of known false-positive signatures into the prompt context and require the model to justify any finding that matches a signature before including it in the prioritized output.
Copy-Ready Prompt Template
A reusable prompt template for triaging raw linter output into a prioritized, deduplicated, and categorized action plan.
The following template is designed to be dropped into your AI harness, whether you're building a CI bot, a PR review assistant, or an internal DevSecOps dashboard. It takes raw, often noisy linter output and transforms it into a structured JSON payload that your application can consume directly. The prompt uses square-bracket placeholders for all dynamic inputs, making it straightforward to wire into a pipeline where [LINTER_OUTPUT] is piped from a tool like ESLint, Pylint, or Semgrep, and [REPOSITORY_CONTEXT] is assembled from file paths, recent commits, or a CODEBUDDY.md.
codeYou are a senior DevSecOps engineer triaging raw linter output for a production codebase. Your task is to process the provided linter output and produce a prioritized, deduplicated, and categorized list of findings. Your output will be used by an automated system to assign tickets and notify code owners, so strict schema adherence is critical. ## INPUT [LINTER_OUTPUT] ## REPOSITORY CONTEXT [REPOSITORY_CONTEXT] ## CONSTRAINTS - Deduplicate findings that share the same root cause, file, and line range. Keep the highest severity instance and note the count of duplicates in the `duplicate_count` field. - Map all tool-specific severities to a standard scale: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `INFO`. - Estimate remediation effort as `TRIVIAL` (<15 min), `SMALL` (<1 hr), `MEDIUM` (<4 hrs), or `LARGE` (>4 hrs). - Suggest a likely owner team based on file path patterns in [REPOSITORY_CONTEXT] (e.g., `**/*.spec.ts` -> `QA-Team`). - Flag any finding that appears to be a false positive based on common patterns (e.g., a lint rule conflicting with a documented team convention in [REPOSITORY_CONTEXT]). Provide a brief justification in `false_positive_reason`. - Do not invent or assume file paths, code snippets, or fixes not present in the input. ## OUTPUT_SCHEMA Return a single JSON object with a `findings` array. Each object in the array must conform to this schema: { "finding_id": "string (unique slug, e.g., 'no-unused-vars-src-utils-helper-ts-L12')", "category": "string (e.g., 'security', 'bug-risk', 'style', 'performance', 'maintainability')", "severity": "CRITICAL | HIGH | MEDIUM | LOW | INFO", "file_path": "string", "line_range": "string (e.g., 'L12-L15')", "rule_id": "string (original linter rule identifier)", "message": "string (original, unaltered linter message)", "duplicate_count": "number (1 if unique)", "effort_estimate": "TRIVIAL | SMALL | MEDIUM | LARGE", "suggested_owner": "string (team or 'unknown')", "is_false_positive": "boolean", "false_positive_reason": "string | null" } ## PRIORITY SORT ORDER Sort the `findings` array by: 1. Severity (CRITICAL first) 2. Category (security before style) 3. File path (alphabetical) 4. Line number (ascending) Return only the JSON object. Do not include any text outside the JSON.
To adapt this template, start by replacing [LINTER_OUTPUT] with the raw stdout or JSON report from your linter. The [REPOSITORY_CONTEXT] placeholder should be filled with a concise map of file ownership patterns, a CODEOWNERS file excerpt, or a summary of team conventions that might justify suppressing a rule. If you're using a model with a small context window, consider pre-filtering the linter output to only include errors and warnings before passing it in. For high-risk repositories, add a [RISK_LEVEL] constraint that adjusts the severity mapping for security rules, ensuring no CRITICAL finding is ever auto-suppressed without human review.
Before deploying this prompt, validate its output against your application's schema. A common failure mode is the model collapsing multiple findings into a single object or inventing a suggested_owner when no ownership data is provided. Implement a post-processing validator that checks for unique finding_id values, rejects any finding with a file_path not present in the original linter output, and escalates findings flagged as is_false_positive: true to a human review queue. Wire the validated JSON directly into your ticketing system, using the suggested_owner field to route the issue.
Prompt Variables
Required inputs for the Linter Output Triage and Prioritization prompt. Each placeholder must be populated before the prompt is assembled and sent. Validation notes describe how to verify the input is well-formed before execution.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[RAW_LINT_OUTPUT] | The complete, unmodified output from one or more linter runs. This is the primary data the prompt will triage. | eslint output JSON blob or a concatenated text block from multiple tools | Must be non-empty. Validate that the text contains recognizable finding lines (file path, line number, message). Reject if only whitespace or shell prompts. |
[REPOSITORY_CONTEXT] | A summary of the repository structure, language, framework, and team conventions. Used to assess impact and suggest owners. | A CODEOWNERS file snippet, directory tree overview, or a brief paragraph describing the monorepo structure. | Must include at least one of: language, primary framework, or team ownership mapping. Null allowed if ownership is inferred from file paths. |
[SEVERITY_MAPPING] | A mapping from tool-specific severity levels to a normalized scale (e.g., Critical, High, Medium, Low, Info). Ensures consistent prioritization. | {"eslint:error": "High", "eslint:warning": "Medium", "pylint:error": "High"} | Must be a valid JSON object. Keys must match the linter rule prefixes found in [RAW_LINT_OUTPUT]. Reject if the mapping is empty or uses undefined severity labels. |
[FALSE_POSITIVE_PATTERNS] | A list of known false-positive signatures, file paths, or rule IDs to suppress or flag for review. Prevents noise from dominating the triage. | ["no-console in .test.js", "CVE-2023-XXXXX in vendor/"] | Must be a valid JSON array of strings. Each entry should be a glob pattern or rule ID. Null allowed if no suppression list exists. |
[EFFORT_MODEL] | A heuristic or lookup table for estimating fix effort based on rule type, file complexity, and historical fix data. Used to assign t-shirt sizes. | {"eslint:no-unused-vars": "XS", "bandit:B301": "M", "default": "S"} | Must be a valid JSON object. The 'default' key is required as a fallback. Reject if effort labels are not from the allowed set: XS, S, M, L, XL. |
[OUTPUT_SCHEMA] | The exact JSON schema the model must conform to for each finding in the prioritized list. Defines the contract for downstream consumers. | {"type": "object", "properties": {"id": {"type": "string"}, "severity": {"type": "string"}, "effort": {"type": "string"}}, "required": ["id", "severity", "effort"]} | Must be a valid JSON Schema (draft-07). The 'required' array must include at least 'file_path', 'rule_id', and 'severity'. Reject if the schema is not parseable. |
[MAX_FINDINGS] | An integer cap on the number of findings to return in the prioritized list. Prevents context window overflow and focuses attention. | 25 | Must be a positive integer between 1 and 200. Reject if the value is 0, negative, or non-numeric. Default to 50 if not provided. |
Implementation Harness Notes
How to wire the Linter Output Triage and Prioritization prompt into a DevSecOps pipeline or developer workflow.
This prompt is designed to sit behind an API endpoint or a CI job that receives raw, multi-tool linter output. The application layer is responsible for collecting the raw findings, normalizing them into the [LINT_OUTPUT] format expected by the prompt, and handling the structured response. Do not pass raw, unprocessed tool stdout directly to the model; always pre-parse it into a consistent JSON or Markdown list of findings with at least file, line, rule_id, and message fields. This pre-processing step is critical because the model's triage quality depends on receiving clean, deduplicated input with consistent field names across tools like ESLint, Pylint, and Semgrep.
After the model returns the prioritized JSON payload, validate it against the expected [OUTPUT_SCHEMA] before any downstream action. A lightweight validation layer should check that every finding in the response maps back to a finding in the original input (no hallucinated violations), that severity levels are within the allowed enum, and that the deduplicated_group_id references are internally consistent. If validation fails, retry once with the validation errors appended to the prompt as additional [CONSTRAINTS]. Log every triage response, including the raw model output, validation result, and any retries, to an observability store for later audit and prompt regression testing. For high-risk security findings where a false negative could mean a missed vulnerability, route CRITICAL severity items to a human review queue before auto-closing or suppressing them.
Model choice matters here. Use a model with strong JSON mode and long-context handling, such as gpt-4o or claude-3.5-sonnet, because the input payload can be large and the output schema is deeply nested. Set temperature to 0 or a very low value to maximize deterministic severity mapping and deduplication. If you are processing findings from a monorepo with thousands of violations, chunk the input by directory or rule category and run parallel triage calls, then merge the results with a final deduplication pass. Avoid wiring this prompt directly into an auto-fix pipeline without human approval for any finding above LOW severity; the triage output is a prioritization artifact, not a remediation command.
Expected Output Contract
Define the exact shape of the model's response so downstream systems can parse, validate, and route findings without ambiguity.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
findings | Array of objects | Must be a non-empty JSON array. Schema check: each element must match the finding object contract. | |
findings[].id | String (kebab-case) | Must match pattern | |
findings[].severity | Enum: critical, high, medium, low, info | Must be one of the listed enum values. Case-sensitive. No custom severities allowed. | |
findings[].category | Enum: security, bug, style, performance, maintainability, type-safety | Must be one of the listed enum values. Category must align with the original linter rule metadata where available. | |
findings[].file_path | String (relative path) | Must be a non-empty string. Should match a file path pattern from the source repository. Null or absolute paths are invalid. | |
findings[].line_range | Object with start and end integers | If present, start and end must be positive integers with start <= end. Null allowed when finding is file-scoped. | |
findings[].is_false_positive | Boolean | Must be true or false. If true, a justification field must also be present and non-empty. | |
findings[].dedup_group | String or null | Findings with the same root cause must share the same dedup_group identifier. Null if the finding is unique. |
Common Failure Modes
What breaks first when triaging linter output and how to guard against it in production.
Severity Inflation or Deflation
What to watch: The model misclassifies a cosmetic warning as a blocker or downgrades a security vulnerability to a style nit. This skews the entire triage queue and erodes trust with development teams. Guardrail: Provide a strict severity mapping table in the prompt with concrete examples for each level. Validate output severity against a known set of CWE/CVE scores or rule metadata before accepting the prioritization.
Duplicate Findings Across Tools
What to watch: Running ESLint, Pylint, and SonarQube on the same file produces logically identical findings that the model fails to deduplicate. The triage list becomes bloated, and teams waste effort on the same root cause. Guardrail: Include explicit deduplication rules based on file path, line range, and rule category. Post-process the output with a fuzzy-matching script that flags near-duplicates for human review before the list is published.
False Positive Over-Suppression
What to watch: The model becomes too eager to flag findings as false positives, especially for complex security rules it doesn't fully understand. Real vulnerabilities get suppressed with plausible-sounding justifications. Guardrail: Require the model to cite specific code evidence and rule semantics when classifying a false positive. Route all suppression suggestions to a human approval queue, and log the justification for audit.
Owner Assignment Hallucination
What to watch: The model guesses file owners based on names in comments or commit messages, assigning findings to people who left the team years ago or never touched the code. Guardrail: Feed the model a current CODEOWNERS file or team-to-path mapping as a required input. If no owner can be determined from the provided data, the output must default to a generic team alias like platform-team rather than guessing.
Effort Estimation Drift
What to watch: The model estimates a complex refactor as trivial or a simple rename as high-effort, causing sprint planning chaos. Estimates become inconsistent across similar finding types. Guardrail: Anchor effort estimates with a concrete scale (e.g., XS: <5 lines, S: single file, M: multi-file, L: architecture change). Include few-shot examples that calibrate the model to your team's definition of effort. Validate estimates against historical fix data when available.
Context-Ignorant Prioritization
What to watch: The model prioritizes findings purely by severity without considering whether the affected code is in a hot path, behind a feature flag, or in a deprecated module. Teams fix dead code while production risks remain unaddressed. Guardrail: Supply runtime context such as code coverage data, deployment frequency, or module deprecation status as part of the prompt input. Instruct the model to downgrade findings in cold or deprecated paths unless they are critical security issues.
Evaluation Rubric
Criteria for evaluating the quality of the Linter Output Triage and Prioritization prompt output before integrating it into a CI or review pipeline.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Severity Mapping Accuracy | All findings are mapped to a severity level (e.g., Critical, High, Medium, Low, Info) that matches the source tool's native rating or a defined organizational mapping policy. | A finding from a tool like Bandit or Semgrep marked as HIGH is downgraded to Low without a documented suppression reason. | Run a golden set of 20 findings with known severities through the prompt. Assert 100% match against expected severity labels. |
Deduplication Precision | Findings with the same file path, line number, rule ID, and message are collapsed into a single entry. Cross-tool duplicates (e.g., ESLint and SonarJS flagging the same pattern) are merged with a note. | The output contains two separate entries for the same exact violation on the same line, or fails to link a cross-tool duplicate. | Inject a test file with 5 unique violations and 5 exact duplicates. Assert the output list contains exactly 5 entries. |
False-Positive Flagging | Findings that match a known false-positive pattern (e.g., a test file, a vendor directory, or a specific rule-suppression comment) are flagged with | A finding in a path matching | Provide a file with a finding inside a test directory. Assert |
Owner Suggestion Relevance | A suggested owner is derived from | The output suggests an owner who has never committed to the file, or the field contains a generic placeholder like 'team' or 'unknown' when git data was provided. | Provide a mock git blame output. Assert the suggested owner matches the last committer of the affected line. |
Effort Estimation Consistency | Each finding includes an effort estimate (e.g., 'S', 'M', 'L', 'XL') that is consistent with the complexity of the fix and the rule type. | A one-line variable rename is estimated as 'XL', or a complex architectural refactor is estimated as 'S'. | Run 10 findings with pre-classified effort levels. Assert the model's estimate matches the expected t-shirt size within one adjacent level (e.g., M vs L is acceptable, S vs XL is not). |
Output Schema Compliance | The output is a valid JSON array where every object contains the required fields: | The output is missing the | Parse the output with a JSON schema validator. Assert no validation errors. Assert the root type is an array. |
Category Grouping Logic | Findings are grouped into logical categories (e.g., 'Security', 'Performance', 'Style', 'Bug Risk') based on the rule metadata or a provided [CATEGORY_MAP]. | A security rule like 'detect-eval' is placed in the 'Style' category, or categories are inconsistent across similar rules. | Provide a [CATEGORY_MAP] JSON object. Assert that each finding's |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Use the base prompt with a single linter's raw output and a simplified output schema. Drop the deduplication and effort estimation sections. Focus on getting a clean severity categorization and a basic priority order.
code[LINTER_OUTPUT] Categorize each finding by severity (Critical, High, Medium, Low, Info) and return a JSON list ordered by priority.
Watch for
- Severity inflation when the model defaults to "High" for ambiguous rules
- Missing file paths in the output
- The model adding commentary instead of structured JSON

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us