Skip to content

Commit 40fa486

Browse files
authored
Merge pull request #63 from RoddieKieley/001-collection-consistency-audit
001 collection consistency audit
2 parents e89fedc + 594c232 commit 40fa486

14 files changed

Lines changed: 88 additions & 17 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,4 @@ config.local.*
113113

114114
# Generated Documentation
115115
docs/data.json
116+
reports/

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ last_updated: YYYY-MM-DD
175175
1. Create `skills/<skill-name>/SKILL.md`
176176
2. Define YAML frontmatter with mandatory fields:
177177
- `name`, `description` (agentskills.io spec)
178-
- `model` (inherit|sonnet|haiku), `color` (cyan|green|blue|yellow|red) - Repository requirement
178+
- `model` (inherit|sonnet|haiku), `color` (cyan|green|blue|yellow|red|magenta) - Repository requirement
179179
- Optional: `metadata` for custom fields (author, priority, version)
180180
3. Follow [SKILL_DESIGN_PRINCIPLES.md](SKILL_DESIGN_PRINCIPLES.md) for:
181181
- Section structure and ordering
@@ -237,7 +237,7 @@ When creating new collection, use `rh-sre` as the architectural reference.
237237

238238
The `rh-virt` pack demonstrates skill quality standardization:
239239
- Comprehensive skill templates (`SKILL_TEMPLATE.md`)
240-
- Risk-based color coding (cyan/green/blue/yellow/red)
240+
- Risk-based color coding (cyan/green/blue/yellow/red/magenta)
241241
- Mandatory Common Issues and Example Usage sections
242242
- Consistent section ordering and formatting
243243

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,18 @@ for m in ocp-admin rh-ai-engineer rh-automation rh-developer rh-sre rh-virt; do
8484

8585
## 📦 Available Plugins
8686

87-
7 persona-focused plugins with **60+ production-ready skills**:
87+
6 persona-focused plugins with **62 production-ready skills**:
8888

8989
| Plugin | Version | Skills | Description | Personas |
9090
|--------|---------|--------|-------------|----------|
9191
| **[rh-sre](rh-sre/README.md)** | 1.0.0 | 13 | CVE remediation, system compliance, RHEL automation | Site Reliability Engineers |
9292
| **[rh-developer](rh-developer/README.md)** | 1.0.0 | 14 | Application deployment, S2I builds, Helm charts | Application Developers |
9393
| **[openshift-virtualization](rh-virt/README.md)** | 1.0.0 | 10 | VM lifecycle, snapshots, migrations, cloning | Virtualization Admins |
9494
| **[ocp-admin](ocp-admin/README.md)** | 1.0.0 | 3 | Multi-cluster management, health reports, monitoring | OpenShift Administrators |
95-
| **[rh-ai-engineer](rh-ai-engineer/README.md)** | 1.0.0 | 12 | Model serving, vLLM, KServe, NVIDIA NIM | AI/ML Engineers |
95+
| **[rh-ai-engineer](rh-ai-engineer/README.md)** | 1.0.0 | 11 | Model serving, vLLM, KServe, NVIDIA NIM | AI/ML Engineers |
9696
| **[rh-automation](rh-automation/README.md)** | 1.0.0 | 11 | Ansible Automation Platform governance, safety checks | Automation Leads |
97-
| **[rh-support-engineer](rh-support-engineer/README.md)** | 1.0.0 | 0* | Technical support and troubleshooting | Support Engineers |
9897

99-
**Total:** 63 skills across 7 plugins | **License:** Apache 2.0 | **Status:** Production Ready
100-
101-
<sub>* Coming soon</sub>
98+
**Total:** 62 skills across 6 plugins | **Standalone Agents:** 0 | **Orchestration:** Delivered through orchestration skills where applicable | **License:** Apache 2.0 | **Status:** Production Ready
10299

103100
---
104101

@@ -222,6 +219,7 @@ Use the `validate-skill-design` and `validate-skill-design-changed` targets to c
222219
- Human-in-the-loop requirements for critical operations (DP5)
223220
- Mandatory sections (Prerequisites, When to Use, Workflow) (DP6)
224221
- Credential security (no `echo $VAR` exposure) (DP7)
222+
- Required frontmatter policy (`model` required: `inherit|sonnet|haiku`; `color` required: `cyan|green|blue|yellow|red|magenta`)
225223

226224
```bash
227225
# Validate only changed skills (staged + unstaged) - recommended for local dev
@@ -296,6 +294,22 @@ gitleaks protect --staged
296294

297295
See [SECURITY.md](SECURITY.md) for details.
298296

297+
## Consistency Audit Severity Guide
298+
299+
Use the consistency audit outputs to prioritize fixes:
300+
301+
- **blocking**: must be fixed before merge; CI fails.
302+
- **high**: warning in initial rollout; prioritize in same PR when practical.
303+
- **medium**: warning; schedule near-term cleanup.
304+
- **informational**: track for hygiene improvements.
305+
306+
Recommended remediation workflow:
307+
308+
1. Run `make validate-consistency-audit`.
309+
2. Review `reports/consistency-audit.json` and `reports/consistency-audit.md`.
310+
3. Fix all blocking findings first, then high findings related to changed files.
311+
4. Re-run `make validate-consistency-audit-ci` before opening or updating a PR.
312+
299313
## Adding a New MCP Server
300314

301315
To add a new MCP server to an agentic pack and display it on the documentation site:

SKILL_DESIGN_PRINCIPLES.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ Every skill MUST include complete Dependencies section.
125125
| green | Success, deployment |
126126
| yellow | Caution, validation |
127127
| red | Critical, security, remediation |
128-
| magenta | Creative, generation |
129128

130129
## 4. Skill-to-Skill Invocation Standard
131130

@@ -241,7 +240,7 @@ name: skill-name # MANDATORY - kebab-case, matches directory
241240
description: | # MANDATORY - <500 tokens, includes use cases
242241
[With "Use when" and "NOT for"]
243242
model: inherit # MANDATORY - inherit | sonnet | haiku
244-
color: green # MANDATORY - cyan|green|blue|yellow|red
243+
color: green # MANDATORY - cyan|green|blue|yellow|red|magenta
245244
---
246245
```
247246

@@ -250,12 +249,17 @@ color: green # MANDATORY - cyan|green|blue|yellow|red
250249
- `sonnet` - Complex reasoning
251250
- `haiku` - Simple, fast operations
252251

252+
**Validation Enforcement:**
253+
- `scripts/validate_skill_design.py` and `scripts/validate-skills.sh` MUST both enforce required `model` presence and valid model values.
254+
- Any drift between validators is treated as a policy inconsistency and must be corrected before merge.
255+
253256
**Color Values (Risk-Based):**
254257
- `cyan` - Read-only (list, view, get)
255258
- `green` - Additive (create, clone)
256259
- `blue` - Reversible (start, stop, restart)
257260
- `yellow` - Destructive but recoverable (snapshot-delete)
258261
- `red` - Irreversible (delete, restore)
262+
- `magenta` - Creative/generative workflows (content generation, templating)
259263

260264
**B. Prerequisites Section Must Include:**
261265
- Required MCP Servers with setup links

docs/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ To manually update the site:
3939
4. Commit the updated `docs/data.json` and any `.catalog/` files.
4040
5. Push to trigger GitHub Pages deployment.
4141

42+
## Consistency Audit for Docs Metadata
43+
44+
When changing docs presentation metadata (`styles.css`, `app.js`, `icons.json`, `plugins.json`, `mcp.json`):
45+
46+
1. Prefer canonical tokens from `styles.css` and `style-tokens.json` over hardcoded values.
47+
2. Ensure every in-scope pack has icon/title mappings in `icons.json` and `plugins.json`.
48+
3. Run the audit checks:
49+
50+
```bash
51+
make validate-consistency-audit
52+
```
53+
54+
4. Review style/icon findings in `reports/consistency-audit.md` before merge.
55+
4256
## Security
4357

4458
All DOM manipulation in `app.js` uses `textContent` and `createElement` to prevent XSS vulnerabilities. No `innerHTML` is used with user-provided data.

docs/app.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ let data = null;
99
let allPacks = [];
1010
let allMCPServers = [];
1111
let allCommunityMCPServers = [];
12+
const JS_STYLE_TOKENS = {
13+
errorColor: 'var(--primary)',
14+
mutedTextColor: 'var(--text-muted)',
15+
subtleErrorBackground: 'var(--primary-light)',
16+
softAccentBackground: 'var(--primary-light)'
17+
};
1218

1319
/** Default LICENSE in upstream repo (collection legal_resources may override). */
1420
const UPSTREAM_REPO_LICENSE_URL = 'https://github.com/RHEcosystemAppEng/agentic-collections/blob/main/LICENSE';
@@ -105,7 +111,7 @@ async function init() {
105111
function showError(message) {
106112
const main = document.querySelector('main');
107113
const errorDiv = document.createElement('div');
108-
errorDiv.style.color = '#ee0000';
114+
errorDiv.style.color = JS_STYLE_TOKENS.errorColor;
109115
errorDiv.style.padding = '2rem';
110116
errorDiv.style.textAlign = 'center';
111117
errorDiv.textContent = `Error: ${message}`;
@@ -126,7 +132,7 @@ function renderPacks(packs) {
126132
if (packs.length === 0) {
127133
const noResults = document.createElement('p');
128134
noResults.textContent = 'No packs found matching your search.';
129-
noResults.style.color = '#d2d2d2';
135+
noResults.style.color = JS_STYLE_TOKENS.mutedTextColor;
130136
grid.appendChild(noResults);
131137
return;
132138
}
@@ -251,7 +257,7 @@ function renderMCPServers(servers) {
251257
if (servers.length === 0) {
252258
const noResults = document.createElement('p');
253259
noResults.textContent = 'No MCP servers found matching your search.';
254-
noResults.style.color = '#d2d2d2';
260+
noResults.style.color = JS_STYLE_TOKENS.mutedTextColor;
255261
grid.appendChild(noResults);
256262
return;
257263
}
@@ -276,7 +282,7 @@ function renderCommunityMCPServers(servers) {
276282
if (servers.length === 0) {
277283
const noResults = document.createElement('p');
278284
noResults.textContent = 'No community MCP servers found matching your search.';
279-
noResults.style.color = '#d2d2d2';
285+
noResults.style.color = JS_STYLE_TOKENS.mutedTextColor;
280286
grid.appendChild(noResults);
281287
return;
282288
}
@@ -594,7 +600,7 @@ function showPackDetails(packName) {
594600

595601
const nameCode = document.createElement('code');
596602
nameCode.textContent = pack.plugin.name;
597-
nameCode.style.backgroundColor = 'rgba(238, 0, 0, 0.1)';
603+
nameCode.style.backgroundColor = JS_STYLE_TOKENS.subtleErrorBackground;
598604
nameCode.style.padding = '0.25rem 0.5rem';
599605
nameCode.style.borderRadius = '4px';
600606
nameCode.style.fontSize = '0.85rem';
@@ -934,7 +940,7 @@ lola install -f ${moduleName}`;
934940
// Hover effects
935941
mcpDef.onmouseenter = () => {
936942
mcpDef.style.borderLeftColor = 'var(--primary)';
937-
mcpDef.style.backgroundColor = 'rgba(238, 0, 0, 0.05)';
943+
mcpDef.style.backgroundColor = JS_STYLE_TOKENS.softAccentBackground;
938944
arrow.style.transform = 'translateX(4px)';
939945
};
940946

docs/style-tokens.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"colors": {
3+
"primary": "var(--primary)",
4+
"primaryDark": "var(--primary-dark)",
5+
"primaryLight": "var(--primary-light)",
6+
"textPrimary": "var(--text-primary)",
7+
"textSecondary": "var(--text-secondary)",
8+
"textMuted": "var(--text-muted)"
9+
},
10+
"sizes": {
11+
"cardIcon": "1.2rem",
12+
"itemIcon": "1rem"
13+
},
14+
"usage": {
15+
"stylesCss": "docs/styles.css",
16+
"appJs": "docs/app.js",
17+
"iconsJson": "docs/icons.json",
18+
"pluginsJson": "docs/plugins.json",
19+
"mcpJson": "docs/mcp.json"
20+
}
21+
}

rh-sre/skills/cve-impact/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ description: |
88
NOT for remediation (use `/remediation`).
99
1010
System-level: FIRST reply = pagination prompt (Step -1). Parsing: references/01-cve-response-parser.py.
11+
model: inherit
12+
color: blue
1113
---
1214

1315
# CVE Impact Analysis Skill

rh-sre/skills/cve-validation/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ description: |
1717
- "Remediate CVE-X" / "Patch CVE-X" → `/remediation` skill
1818
1919
This skill orchestrates MCP tools (get_cve) for CVE validation. The `/remediation` skill invokes this skill as Step 2 of its workflow.
20+
model: inherit
21+
color: blue
2022
---
2123

2224
# CVE Validation Skill

rh-sre/skills/playbook-executor/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ description: |
1212
- "Dry-run the playbook first"
1313
1414
**Git Flow**: If template playbook path ≠ generated playbook, perform Git Flow (commit, push, sync) BEFORE launch.
15+
model: inherit
16+
color: red
1517
---
1618

1719
# AAP Playbook Executor Skill

0 commit comments

Comments
 (0)