You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LLM analyzer prompts carry redundant content that inflates token consumption without improving detection quality:
Line numbers are zero-padded (L001: instead of L1:), adding ~3 wasted characters per line across every file sent to the LLM.
The meta-analyzer embeds each finding's context snippet in the prompt alongside the full line-numbered file content, duplicating the same code.
The OverallAssessment field in MetaAnalyzerResult is generated by the LLM but never consumed downstream (the report node computes its own risk score).
Several analyzer prompts (SSD, SDI, SQP, meta-analyzer, TP4) contain repeated phrasing, verbose formatting (horizontal rules, per-section rule-ID reminders already present in the
summary table), and filler sentences.
Proposal: Introduce a SKILLSPECTOR_COMPACT_PROMPTS=true environment variable that activates condensed prompt variants. Default behavior stays identical for backward compatibility.
When enabled:
Line numbers drop zero-padding (L1: instead of L001:)
Meta-analyzer omits redundant finding context from the prompt
Meta-analyzer uses a slimmer structured output schema (no OverallAssessment)
All five LLM analyzer prompts use condensed variants (same semantic content, less formatting overhead)
BASE_ANALYSIS_PROMPT output guidelines shortened from 5 lines to 2
Estimated savings per scan: 400-800 input tokens from prompt condensation, ~375 input tokens per call from line numbering (on a 500-line file), 30-50 output tokens per meta-analyzer call from schema reduction, plus variable savings from context omission.
Two compact-prompt implementations are under review: PR #457 proposes the broader opt-in compact mode, while PR #542 implements the first line-number compaction slice. Keeping this feature open until maintainers select and merge the intended scope.
Status correction: the broader compact-prompt implementation, PR #457, is now a draft. The smaller line-number compaction slice, PR #542, remains open and ready for review. Neither has merged; keeping this feature open pending acceptance and merge of the intended scope.
PR #542 has now merged. It implements item 1: SKILLSPECTOR_COMPACT_PROMPTS=true removes zero-padding from prompt line numbers while preserving the default behavior. The relevant default/compact prompt regressions pass on current main at 844ac30.
This remains a partial implementation of the issue. Items 2-5 (omitting duplicate meta-analyzer context, slimming its output schema, condensed analyzer prompts, and shorter base guidelines) have not landed. The broader PR #457 remains a draft. Keeping the issue open for that remaining scope; the merged line-number slice is not yet in the latest published release, v2.11.2.
Publication update: the line-number compaction from PR #542 is now included in v2.12.0. This supersedes the earlier “not yet released” status. Items 2-5 remain outstanding, with the broader PR #457 still draft, so this issue remains open.
Merged #542 delivered line-number compaction only. The remaining compact-prompt items are still in draft #457.
Keeping this issue open: the relevant implementation is not merged and the remaining scope still needs verification. Check/review status is a point-in-time snapshot, not a claim of merge readiness.
Merge-state update checked on 2026-10-06: PR #457 is closed without merging, so it is no longer an active implementation.
Merged PR #542 delivered compact line numbering only. Context deduplication, the slimmer meta-analysis schema, condensed analyzer prompts, and shorter base output guidance remain outside that merged change. Keeping this issue open; no merged PR completes the remaining compact-prompt scope.
Activity
rng1995 commentedon Sep 16, 2026
Two compact-prompt implementations are under review: PR #457 proposes the broader opt-in compact mode, while PR #542 implements the first line-number compaction slice. Keeping this feature open until maintainers select and merge the intended scope.
rng1995 commentedon Sep 21, 2026
Status correction: the broader compact-prompt implementation, PR #457, is now a draft. The smaller line-number compaction slice, PR #542, remains open and ready for review. Neither has merged; keeping this feature open pending acceptance and merge of the intended scope.
rng1995 commentedon Sep 22, 2026
PR #542 has now merged. It implements item 1:
SKILLSPECTOR_COMPACT_PROMPTS=trueremoves zero-padding from prompt line numbers while preserving the default behavior. The relevant default/compact prompt regressions pass on currentmainat844ac30.This remains a partial implementation of the issue. Items 2-5 (omitting duplicate meta-analyzer context, slimming its output schema, condensed analyzer prompts, and shorter base guidelines) have not landed. The broader PR #457 remains a draft. Keeping the issue open for that remaining scope; the merged line-number slice is not yet in the latest published release, v2.11.2.
rng1995 commentedon Sep 23, 2026
Publication update: the line-number compaction from PR #542 is now included in v2.12.0. This supersedes the earlier “not yet released” status. Items 2-5 remain outstanding, with the broader PR #457 still draft, so this issue remains open.
rng1995 commentedon Oct 4, 2026
PR-state snapshot checked on 2026-10-04:
Merged #542 delivered line-number compaction only. The remaining compact-prompt items are still in draft #457.
Keeping this issue open: the relevant implementation is not merged and the remaining scope still needs verification. Check/review status is a point-in-time snapshot, not a claim of merge readiness.
rng1995 commentedon Oct 6, 2026
Merge-state update checked on 2026-10-06: PR #457 is closed without merging, so it is no longer an active implementation.
Merged PR #542 delivered compact line numbering only. Context deduplication, the slimmer meta-analysis schema, condensed analyzer prompts, and shorter base output guidance remain outside that merged change. Keeping this issue open; no merged PR completes the remaining compact-prompt scope.