llm-output-safety
Production safety requirements for pipelines that put LLM-generated text into client-facing outputs: non-Latin character sanitization, programmatic citation integrity, and treating recurring issues as architectural deficiencies. Use when generating reports, exports, or any client-facing document from LLM output.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-12
- Stars
- ★ 6
- Forks
- 1
01 前言 Front Matter
- name
- llm-output-safety
- description
- Production safety requirements for pipelines that put LLM-generated text into client-facing outputs: non-Latin character sanitization, programmatic citation integrity, and treating recurring issues as architectural deficiencies. Use when generating reports, exports, or any client-facing document from LLM output.
03 SKILL.md 正文
LLM Output Safety Rules
Derived from lessons L-050, L-051, L-052. These are production safety requirements for any pipeline that uses LLM-generated text in client-facing outputs.
Non-Latin Character Sanitization (L-050)
Trigger: Any LLM-generated text destined for English-language reports or exports.
Requirements:
- Detect and flag non-Latin script characters (CJK, Cyrillic, Arabic, etc.) in English outputs
- Strip or replace with appropriate English text
- Log every sanitization event for audit trail
- Run at the boundary between LLM response generation and report assembly
- Integration point: the post-processing method that is the universal boundary across all analyzers
Why: LLM training data leaks (e.g., Chinese character "犬" appearing in an English veterinary report) destroy ALL credibility.
Citation Integrity (L-051)
Requirements:
- Citation assignment MUST be programmatic and deterministic, not LLM-dependent
- Post-generation validation: verify cited reference IDs exist in the reference list
- Cardinality rules: flag >5 citations per paragraph as suspicious, >10 as certain hallucination
- LLMs are fundamentally unreliable at citation attribution — this must be a system-level guarantee
Recurring Issues = Architectural Deficiency (L-052)
Rule: When the same CLASS of issue appears in 2+ independent QA reviews, treat it as an architectural deficiency requiring structural redesign, not a per-report bug fix.
Required architectural responses:
- Timeout resilience: critical systems must have retry logic with extended timeouts
- Citation pipeline: fully programmatic with deterministic numbering
- Output validation: LLM text must pass validation before export (non-ASCII, citation patterns, consistency)
- Executive summary cross-validation: programmatically verify claims match structured analysis data
04 同仓库更多 Skills
deploy-helper
You can use this to help with deploy stuff, deploying, deployments, releases, shipping, pushing to prod, going live, rollouts.
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
verify-plan
Slash entry for plan verification: runs plan-verification on an existing AA-MA plan, writes [task]-verification.md, and with --iterate loops until the plan converges. Use when the user types /verify-plan or wants the verification report saved.
verify-impl
Post-impl adversarial review symmetric to /verify-plan. Dispatches up to 5 parallel audit agents (code-reviewer, security-auditor, tdd-sequence-auditor, context7-evidence-auditor, future-proofing-auditor) based on the milestone's plan-declared Audit-Profile. CRITICAL findings surface via AskUserQuestion accept/dispute/defer panel before §7.3 user authorization. Introduced in v0.8.0 per ADR-0005. Invoked by Phase 6.8 of /execute-aa-ma-milestone.
understand-codebase
Onboard to a new, inherited, or shared codebase. Read it, understand it, map it, and learn its conventions, versioning, tests, tech stack, rules (AGENTS.md / CLAUDE.md / .cursorrules / etc.), build/run/CI, integrations, security posture, and repo health — then produce an honest pros/cons verdict, a "contribute safely" playbook, and an "add a feature" playbook, written to ONBOARDING.md at the repo root plus a .claude/onboarding/ set of deep-dives — and optionally author an AGENTS.md if one is missing, or review and propose improvements to an existing one. Tiered (Quick / Standard / Deep). Reuses codemem (index + diagrams), gsd-map-codebase, system-mapping, code-intelligence, impact-analysis rather than re-implementing them; Deep tier runs a TeamCreate agent-team. Keywords: new codebase, shared codebase, inherited code, onboard, understand this repo, how do I contribute, how do I add a feature, ramp up, get oriented, ONBOARDING.md, AGENTS.md, codebase walkthrough, joining a project.
token-compression
Output token compression for AA-MA workflows. Reduces response tokens by 40-75% while preserving full technical accuracy. Three intensity levels mapped to execution modes: lite (HITL), full (general), ultra (AFK). Auto-activates during AA-MA execution based on task Mode field. Manual activation via /compress lite|full|ultra.