Purpose
Enforce LLM content governance for all LLM-facing files using TERSE mode defaults, rule-driven validation, and deterministic tooling.
Apply rules from skills/llm-governance/rules/99-llm-prompt-writing-rules.md and related governance rule files through standardized validators instead of ad-hoc scripts. Provide operational health reporting, capability matrix generation, and structural compliance checking for agents, skills, commands, and rules.
IO Semantics
Input: LLM-facing markdown and configuration files.
Output: Governance findings, severity classifications, suggested edits, and updated files when explicitly approved by higher-level commands.
Side effects: Backups created by orchestration commands before modifications; no direct writes required when running validation only.
Deterministic Steps
1. Toolchain Validation
- Use
tool_checker.py to confirm availability of required tools and select fallbacks.
- Abort governance execution for this skill when critical tools are missing and cannot be replaced safely.
2. Target Selection
- Select LLM-facing files using directory classification:
commands/**/*.md
skills/**/SKILL.md
agents/**/AGENT.md
rules/**/*.md
CLAUDE.md
AGENTS.md
.claude/settings.json
- Exclude non LLM-facing directories such as documentation, examples, tests, IDE metadata, and backup directories.
3. Automated Validation
- Run
python3 skills/llm-governance/scripts/validator.py <directory> across the selected scope.
- Validator uses
skills/llm-governance/scripts/config.yaml as Single Source of Truth (SSOT) for all validation rules.
- For each file, detect:
- Body bold markers outside code blocks.
- Emoji and decorative Unicode characters.
- Narrative paragraphs and conversational patterns.
- Missing or malformed frontmatter for skills, agents, commands, rules, and memory files.
- Classify violations by severity using rule definitions from
skills/llm-governance/rules/99-llm-prompt-writing-rules.md.
4. Content Normalization Guidelines
- Enforce TERSE mode:
- Rewrite narrative paragraphs into imperative directives.
- Remove conversational fillers and hedging language.
- Maintain high information density and precise terminology.
- Enforce formatting rules:
- Remove non code bold markers from body content.
- Remove emoji and non-essential decorative Unicode characters.
- Preserve code blocks and required technical symbols.
- Enforce structural rules:
- Ensure required frontmatter fields and section ordering per directory classification.
- Normalize heading levels and list formatting for clarity and determinism.
5. Operational Health and Matrix Reporting
- Generate agent and skill capability matrices using
agent-matrix.sh and skill-matrix.sh to snapshot capability-level, loop-style, and style coverage.
- Run
structure-check.sh to validate taxonomy-rfc compliance (layer: execution annotations, absence of legacy COMMAND.md files).
- Correlate governance findings with operational metadata for health reports and rollback candidate identification.
6. Integration with Orchestration Commands
- Delegate bulk analysis, candidate generation, backup creation, and writeback decisions to
/llm-governance and agent:llm-governance.
- Use this skill to interpret validator results, derive rewrite strategies, and keep governance behavior aligned with rule files.
Validation Criteria
- No body bold markers outside code blocks in LLM-facing files.
- No emoji or decorative Unicode characters in governed content.
- Communication is terse, directive, and TERSE-mode compliant.
- Required frontmatter fields and sections are present for each governed directory classification.
- All governance violations are either resolved or documented with justification in governance reports.
1---2name: llm-governance3description: LLM content governance and compliance standards. Use when llm governance guidance is required.4---5## Purpose
6
7Enforce LLM content governance for all LLM-facing files using TERSE mode defaults, rule-driven validation, and deterministic tooling.
8
9Apply rules from `skills/llm-governance/rules/99-llm-prompt-writing-rules.md` and related governance rule files through standardized validators instead of ad-hoc scripts. Provide operational health reporting, capability matrix generation, and structural compliance checking for agents, skills, commands, and rules.
10
11## IO Semantics
12
13Input: LLM-facing markdown and configuration files.
14
15Output: Governance findings, severity classifications, suggested edits, and updated files when explicitly approved by higher-level commands.
16
17Side effects: Backups created by orchestration commands before modifications; no direct writes required when running validation only.
18
19## Deterministic Steps
20
21### 1. Toolchain Validation
22
23- Use `tool_checker.py` to confirm availability of required tools and select fallbacks.
24- Abort governance execution for this skill when critical tools are missing and cannot be replaced safely.
25
26### 2. Target Selection
27
28- Select LLM-facing files using directory classification:
29 - `commands/**/*.md`
30 - `skills/**/SKILL.md`
31 - `agents/**/AGENT.md`
32 - `rules/**/*.md`
33 - `CLAUDE.md`
34 - `AGENTS.md`
35 - `.claude/settings.json`
36- Exclude non LLM-facing directories such as documentation, examples, tests, IDE metadata, and backup directories.
37
38### 3. Automated Validation
39
40- Run `python3 skills/llm-governance/scripts/validator.py <directory>` across the selected scope.
41- Validator uses `skills/llm-governance/scripts/config.yaml` as Single Source of Truth (SSOT) for all validation rules.
42- For each file, detect:
43 - Body bold markers outside code blocks.
44 - Emoji and decorative Unicode characters.
45 - Narrative paragraphs and conversational patterns.
46 - Missing or malformed frontmatter for skills, agents, commands, rules, and memory files.
47- Classify violations by severity using rule definitions from `skills/llm-governance/rules/99-llm-prompt-writing-rules.md`.
48
49### 4. Content Normalization Guidelines
50
51- Enforce TERSE mode:
52 - Rewrite narrative paragraphs into imperative directives.
53 - Remove conversational fillers and hedging language.
54 - Maintain high information density and precise terminology.
55- Enforce formatting rules:
56 - Remove non code bold markers from body content.
57 - Remove emoji and non-essential decorative Unicode characters.
58 - Preserve code blocks and required technical symbols.
59- Enforce structural rules:
60 - Ensure required frontmatter fields and section ordering per directory classification.
61 - Normalize heading levels and list formatting for clarity and determinism.
62
63### 5. Operational Health and Matrix Reporting
64
65- Generate agent and skill capability matrices using `agent-matrix.sh` and `skill-matrix.sh` to snapshot capability-level, loop-style, and style coverage.
66- Run `structure-check.sh` to validate taxonomy-rfc compliance (layer: execution annotations, absence of legacy COMMAND.md files).
67- Correlate governance findings with operational metadata for health reports and rollback candidate identification.
68
69### 6. Integration with Orchestration Commands
70
71- Delegate bulk analysis, candidate generation, backup creation, and writeback decisions to `/llm-governance` and `agent:llm-governance`.
72- Use this skill to interpret validator results, derive rewrite strategies, and keep governance behavior aligned with rule files.
73
74## Validation Criteria
75
76- No body bold markers outside code blocks in LLM-facing files.
77- No emoji or decorative Unicode characters in governed content.
78- Communication is terse, directive, and TERSE-mode compliant.
79- Required frontmatter fields and sections are present for each governed directory classification.
80- All governance violations are either resolved or documented with justification in governance reports.