llms-full.txt · diff

git:20260623.20fae1d to git:20260623.f492cdd

4 added, 0 removed. Audit A to A.

<!-- VIBETAGS-START -->
# Skill3 — AI Guardrail Rules
> Complete AI guardrail configuration generated from source annotations by VibeTags.
This document contains the full set of AI guardrail rules for this project. AI tools with large context windows (such as Windsurf Cascade, Claude 4.6, or Gemini 1.5 Pro) may load this file directly instead of fetching individual documentation pages.
## Locked Files (Do Not Edit)
The following files are locked. AI tools MUST NOT propose modifications to them.
## Contextual Rules
These files have specific context and focus areas for AI assistance.
### 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
### 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
Never include runtime values of the following elements in logs, console output, external API calls, test fixtures, or mock data.
### se.deversity.skill3.llm.LocalLlmClient.apiKey
- **Reason**: LLM provider API key — never log, echo, or include in errors/fixtures
### se.deversity.skill3.pipeline.BraveSearchClient.apiKey
- **Reason**: Brave Search subscription token — never log, echo, or include in errors/fixtures
## 🧠 Core Functionality
The following elements are well-tested core functionality. Make changes with extreme caution.
### 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.
### 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
These elements are explicitly designed to be thread-safe via the named strategy. Preserve the synchronization invariant on every change.
### 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.
## ❄️ Immutable Types
The following types are immutable. Never introduce non-final fields, setters, or mutating methods.
### se.deversity.skill3.model.ContextBundle
- Immutable type — never introduce non-final fields, setters, or mutating methods.
- **Note**: Immutable record; the sources list is defensively copied in the compact constructor.
## 🔐 Security-Critical Code
These elements are security-critical. Do not weaken security properties. Every change requires security review.
### se.deversity.skill3.llm.AnthropicChatModel
- Security-critical code (aspect: Anthropic API credential handling and hosted-provider network egress).
- Never weaken security properties. Every change requires explicit security review.
### se.deversity.skill3.llm.LlmProviderFactory
- Security-critical code (aspect: LLM provider credential resolution and model selection).
- Never weaken security properties. Every change requires explicit security review.
### se.deversity.skill3.llm.LocalLlmClient
- Security-critical code (aspect: outbound LLM-provider credential (Bearer token) handling).
- Never weaken security properties. Every change requires explicit security review.
### se.deversity.skill3.llm.NameSanitizer
- Security-critical code (aspect: output sanitization: reserved-word stripping must never be weakened).
- Never weaken security properties. Every change requires explicit security review.
### se.deversity.skill3.pipeline.BraveSearchClient
- Security-critical code (aspect: external-API credential handling and the only network egress with a secret token).
- Never weaken security properties. Every change requires explicit security review.
+ ### se.deversity.skill3.pipeline.DiscoveryProvider
+ - Security-critical code (aspect: forwards the Brave subscription token to the search client; must not log it).
+ - Never weaken security properties. Every change requires explicit security review.
+
### se.deversity.skill3.pipeline.HttpPageFetcher
- Security-critical code (aspect: outbound page fetch egress for partly-untrusted URLs; SSRF guard must not be weakened).
- Never weaken security properties. Every change requires explicit security review.
## Deterministic Pure Functions
The following elements must remain pure functions without side effects or mutations.
### se.deversity.skill3.llm.NameSanitizer.sanitize(java.lang.String)
- **Requirement**: Mathematically pure function. No side effects.
<!-- VIBETAGS-END -->