Skip to content

feat: add LLM context output to audit reports#16

Merged
lex00 merged 1 commit into
INTENTIUS:mainfrom
BinaryBourbon:feat/llm-context-output
Jun 26, 2026
Merged

feat: add LLM context output to audit reports#16
lex00 merged 1 commit into
INTENTIUS:mainfrom
BinaryBourbon:feat/llm-context-output

Conversation

@BinaryBourbon

Copy link
Copy Markdown
Contributor

After a report runs, a collapsible LLM context section now appears at the bottom of the report. Paste the generated block into your AI coding assistant's system prompt so it flags the same rule violations before they reach a PR.

Changes

  • web/src/download.tsreportToLLMContext() collects all unique rules from all three tiers (quick wins, needs review, report-only), groups them by lexicon and category, serialises as Markdown. downloadLLMContext() saves the file.
  • web/src/report.tsx — new LLMContext component rendered below report-only; "⬇ LLM context" download button added to header actions.
  • web/src/styles.css — styles for .llm-ctx, .llm-hint, .llm-pre.
  • web/src/report.test.tsx — six new unit tests for reportToLLMContext plus the LLM context label asserted in the existing render test.

Test plan

  • Run npm run test in web/ — all 15 tests pass
  • Audit a repo with findings — verify the LLM context section appears, copy and download work
  • Audit a zero-finding repo — verify the section is absent

🤖 Generated with Claude Code

After a report runs, a collapsible "LLM context" section appears at the
bottom with a pre-formatted block the user can paste into their AI
assistant's system prompt. It lists every rule that fired, grouped by
lexicon (GitHub Actions, Kubernetes, Docker, etc.) and category, with
rule ID and remediation text — so the assistant can flag the same issues
before they reach a PR.

- download.ts: add reportToLLMContext() (groups rules by lexicon →
  category) and downloadLLMContext() (saves as .md)
- report.tsx: add LLMContext component (collapsible details, copy button)
  rendered below report-only; add "⬇ LLM context" download button
- styles.css: add .llm-ctx / .llm-hint / .llm-pre styles
- report.test.tsx: add reportToLLMContext unit tests + assert section
  visible in rendered ReportView

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lex00 lex00 merged commit 3b64a3d into INTENTIUS:main Jun 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants