<!-- VIBETAGS-START -->
# Skill3

> AI guardrail rules generated from source annotations by VibeTags.

AI tools reading this file should respect the guardrails defined below. These rules were extracted from Java source annotations at compile time and apply to all AI assistants including Windsurf Cascade, Cursor, Claude, GitHub Copilot, and Gemini.

## Locked Files

## Contextual Rules
- [CutoffResolver](se.deversity.skill3.pipeline.CutoffResolver): Focus - Keep the cutoff TABLE small and sourced from published model documentation. Avoid - hardcoding per-skill logic; the cutoff is always overridable via --cutoff-time
- [QueryPlanner](se.deversity.skill3.pipeline.QueryPlanner): Focus - keep discovery topic-agnostic — the model plans the queries for any topic. Avoid - hardcoding per-topic search terms or a fixed query suffix like " documentation"

## PII / Privacy Guardrails
- [LocalLlmClient.apiKey](se.deversity.skill3.llm.LocalLlmClient.apiKey): LLM provider API key — never log, echo, or include in errors/fixtures
- [BraveSearchClient.apiKey](se.deversity.skill3.pipeline.BraveSearchClient.apiKey): Brave Search subscription token — never log, echo, or include in errors/fixtures

## 🧠 Core Functionality
- [SkillMdPostProcessor](se.deversity.skill3.llm.SkillMdPostProcessor): Sensitivity: High. Note: Deterministically guarantees SKILL.md spec compliance; model output is never trusted. Changes risk emitting invalid frontmatter — keep the parsing and frontmatter synthesis covered by SkillMdPostProcessorTest.
- [Verifier](se.deversity.skill3.llm.Verifier): Sensitivity: High. Note: Accuracy gate that re-grounds claims against the sources. Only worthwhile with a capable model — a weak model rewrites rather than grounds. Keep the prompt strict about supported-claims-only and announced-vs-shipped.

## 🧵 Thread-Safe by Design
- [RetrievalService](se.deversity.skill3.pipeline.RetrievalService): Strategy: IMMUTABLE. Note: Collaborators (PageFetcher/HttpClient, DateExtractor, AuthorityScorer) are stateless/immutable; each fetch task builds its own Source and results are merged on the caller thread. Keep it that way — do not share mutable state between fetch tasks. The opt-in `sequential` mode only removes concurrency (fetches run on the caller thread); it cannot weaken the invariant — serial execution is strictly safer than the parallel default it replaces.

## ❄️ Immutable Types
- [ContextBundle](se.deversity.skill3.model.ContextBundle): immutable type — Immutable record; the sources list is defensively copied in the compact constructor.

## 🔐 Security-Critical Code
- [AnthropicChatModel](se.deversity.skill3.llm.AnthropicChatModel): Security-critical code [Anthropic API credential handling and hosted-provider network egress]. Do not weaken security properties. Flag any change for security review.
- [LlmProviderFactory](se.deversity.skill3.llm.LlmProviderFactory): Security-critical code [LLM provider credential resolution and model selection]. Do not weaken security properties. Flag any change for security review.
- [LocalLlmClient](se.deversity.skill3.llm.LocalLlmClient): Security-critical code [outbound LLM-provider credential (Bearer token) handling]. Do not weaken security properties. Flag any change for security review.
- [NameSanitizer](se.deversity.skill3.llm.NameSanitizer): Security-critical code [output sanitization: reserved-word stripping must never be weakened]. Do not weaken security properties. Flag any change for security review.
- [BraveSearchClient](se.deversity.skill3.pipeline.BraveSearchClient): Security-critical code [external-API credential handling and the only network egress with a secret token]. Do not weaken security properties. Flag any change for security review.
- [DiscoveryProvider](se.deversity.skill3.pipeline.DiscoveryProvider): Security-critical code [forwards the Brave subscription token to the search client; must not log it]. Do not weaken security properties. Flag any change for security review.
- [HttpPageFetcher](se.deversity.skill3.pipeline.HttpPageFetcher): Security-critical code [outbound page fetch egress for partly-untrusted URLs; SSRF guard must not be weakened]. Do not weaken security properties. Flag any change for security review.

## Deterministic Pure Functions
- [NameSanitizer.sanitize(java.lang.String)](se.deversity.skill3.llm.NameSanitizer.sanitize(java.lang.String)): Must remain a pure function. Forbid assignments to enclosing state, fields, or static members.
<!-- VIBETAGS-END -->
