Skip to content

Commit 6c97435

Browse files
authored
refactor: standardize skill documentation on references/ layout (#156)
* chore: standardize skill documentation on references/ layout * fix: update files that point at docs/ * fix: review fixes and validation adding * fix: review fixes * docs: replaced 22 duplicate files with symlinks across 11 skills * fix: remove redundant CLAUDE line from reference doc
1 parent 8a0b1d5 commit 6c97435

705 files changed

Lines changed: 1585 additions & 1210 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/agentic-contribution-skill/SKILL.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Ask concisely, validate before proceeding. Make additional questions if needed t
118118
4. **Workflow**: "Steps with MCP tools?" (e.g., "1. Validate VM - resources_get")
119119
5. **Common Issues**: "3+ issues: problem: cause: solution"
120120
6. **Prerequisites**: "Special requirements? (env vars, permissions)"
121-
7. **External Resources**: "Any external docs/links/KB articles referenced?" (will be saved to `docs/` folder)
121+
7. **External Resources**: "Any external references/links/KB articles referenced?" (will be saved to `references/` folder)
122122

123123
**Quality over Speed**: Focus on gathering complete, accurate information. Validation and iteration will ensure correctness - prioritize quality of final result over generation time.
124124

@@ -210,7 +210,7 @@ Show complete spec:
210210
**Workflow**: <N> steps
211211
**Common Issues**: <N> documented
212212
**MCP Tools**: <tool_count> tools (verified to exist)
213-
**External Resources**: <count> (will be saved to docs/)
213+
**External Resources**: <count> (will be saved to references/)
214214
**Human-in-the-Loop**: <Yes/No>
215215

216216
[If >10 steps or complex workflow]:
@@ -229,26 +229,26 @@ Proceed with generation? (yes/no)
229229
```bash
230230
mkdir -p <pack>/skills/<skill-name>/
231231
# If external resources provided by user:
232-
mkdir -p <pack>/skills/<skill-name>/docs/
232+
mkdir -p <pack>/skills/<skill-name>/references/
233233
```
234234

235235
**Generate files**:
236236
1. **SKILL.md**: YAML frontmatter + mandatory sections (follow SKILL_DESIGN_PRINCIPLES.md template - already consulted in Phase 3)
237237
- Focus on complete, production-ready content
238238
- Include all relevant information from user and verified sources
239-
- Keep main skill focused; detailed content can go to `docs/` if needed
240-
2. **docs/ folder** (if applicable):
241-
- `docs/workflow-details.md` - Extended workflow explanations if skill is concise
242-
- `docs/common-issues.md` - Detailed troubleshooting with full KB article content
243-
- `docs/examples.md` - Comprehensive usage examples
244-
- `docs/external-resources.md` - Any external docs/links/KB articles mentioned by user
239+
- Keep main skill focused; detailed content can go to `references/` if needed
240+
2. **references/ folder** (if applicable):
241+
- `references/workflow-details.md` - Extended workflow explanations if skill is concise
242+
- `references/common-issues.md` - Detailed troubleshooting with full KB article content
243+
- `references/examples.md` - Comprehensive usage examples
244+
- `references/external-resources.md` - Any external references/links/KB articles mentioned by user
245245
3. **Update <pack>/AGENTS.md**: Add intent routing entry
246246
4. **Create <pack>/mcps.json**: If new MCP server needed (use `${ENV_VAR}` format)
247247
5. **Compass manifests**: Run **compass-manifest-maintenance** (`.claude/skills/compass-manifest-maintenance/`) for registered packs — skill `catalog-info.yaml`, Location targets, bidirectional `dependsOn`/`dependencyOf` on plugin and MCP manifests
248248
6. **Update marketplace/rh-agentic-collection.yml** in [agentic-catalog](https://github.com/RHEcosystemAppEng/agentic-catalog): If new pack (register pack for Lola installation)
249249
7. **Create pack structure**: If new pack (README.md, AGENTS.md, skills/ directory)
250250

251-
Generate SKILL.md following the mandatory section template in SKILL_DESIGN_PRINCIPLES.md (already consulted in Phase 3). If SKILL.md becomes too long, move detailed content to `docs/` with references in main file.
251+
Generate SKILL.md following the mandatory section template in SKILL_DESIGN_PRINCIPLES.md (already consulted in Phase 3). If SKILL.md becomes too long, move detailed content to `references/` with references in main file.
252252

253253
### Phase 5: Validation & Iteration
254254

@@ -267,18 +267,18 @@ uv run python scripts/validate_skills_tier2.py <pack>/skills/<skill-name>/SKILL.
267267
**Report clearly**:
268268
- ✅ PASSED → Proceed to Phase 6
269269
- ⚠️ WARNINGS → Review warnings with user
270-
- Non-standard subdirectory (docs/) is acceptable if needed
270+
- Non-standard subdirectory (references/) is acceptable if needed
271271
- Description buzzwords acceptable if accurate for critical skills
272272
- Ask: "Warnings acceptable? (yes/no)"
273273
- ❌ ERRORS → **Fix required**, iterate until validation passes
274274

275275
**Iteration Protocol** (if validation fails):
276276
1. **Analyze errors**: Identify specific issues (line count, missing sections, format problems)
277277
2. **Determine fix strategy**:
278-
- Line count exceeded → Move detailed content to `docs/` folder, keep main skill concise
278+
- Line count exceeded → Move detailed content to `references/` folder, keep main skill concise
279279
- Missing sections → Add required sections per DP7
280280
- Format issues → Correct frontmatter, section headers, or structure
281-
3. **Apply fixes**: Edit SKILL.md and/or create docs/ files
281+
3. **Apply fixes**: Edit SKILL.md and/or create references/ files
282282
4. **Re-validate**: Run both Tier 1 and Tier 2 again
283283
5. **Repeat until ✅ PASSED**
284284

@@ -358,23 +358,23 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
358358
359359
**Cause**: Skill content is comprehensive but exceeds agentskills.io 500-line limit
360360
361-
**Fix**: Iterate to move detailed content to `docs/` folder:
362-
1. Create `<skill>/docs/` directory
363-
2. Move detailed workflow explanations to `docs/workflow-details.md`
364-
3. Move full troubleshooting KB articles to `docs/common-issues.md`
365-
4. Move comprehensive examples to `docs/examples.md`
366-
5. Keep main SKILL.md concise with references to docs/
361+
**Fix**: Iterate to move detailed content to `references/` folder:
362+
1. Create `<skill>/references/` directory
363+
2. Move detailed workflow explanations to `references/workflow-details.md`
364+
3. Move full troubleshooting KB articles to `references/common-issues.md`
365+
4. Move comprehensive examples to `references/examples.md`
366+
5. Keep main SKILL.md concise with references to references/
367367
6. Re-run validation
368368

369369
**Example**:
370370
```markdown
371371
## Common Issues
372372
373-
See [docs/common-issues.md](docs/common-issues.md) for detailed solutions.
373+
See [references/common-issues.md](references/common-issues.md) for detailed solutions.
374374
375375
### Issue 1: Snapshot Fails
376376
Storage doesn't support snapshots.
377-
**Solution**: Use snapshot-capable storage. [Details](docs/common-issues.md#issue-1)
377+
**Solution**: Use snapshot-capable storage. [Details](references/common-issues.md#issue-1)
378378
```
379379

380380
## Dependencies
@@ -443,7 +443,7 @@ See [Prerequisites](#prerequisites) section for required system tools (git, uv,
443443

444444
## Example Usage
445445

446-
**See [docs/examples.md](docs/examples.md) for comprehensive examples.**
446+
**See [references/examples.md](references/examples.md) for comprehensive examples.**
447447

448448
### Quick Example: Creating VM Backup Skill
449449

@@ -461,8 +461,8 @@ Skill guides through:
461461
Result: Production-ready skill in rh-virt/skills/vm-backup-create/
462462
```
463463
464-
**More examples**: [docs/examples.md](docs/examples.md)
464+
**More examples**: [references/examples.md](references/examples.md)
465465
- Example 1: VM backup skill (complete create interaction)
466466
- Example 2: Non-representative name correction
467467
- Example 3: Importing an existing skill (analysis, adaptation, validation)
468-
- Example 4: Large skill requiring docs/ folder with iteration
468+
- Example 4: Large skill requiring references/ folder with iteration

.claude/skills/agentic-contribution-skill/docs/examples.md renamed to .claude/skills/agentic-contribution-skill/references/examples.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Ready to commit? (yes/no)
210210
[Git workflow with confirmations]
211211
```
212212

213-
## Example 4: Large Skill Requires docs/ Folder
213+
## Example 4: Large Skill Requires references/ Folder
214214

215215
```
216216
[After Phase 2 - Definition]
@@ -236,14 +236,14 @@ Running validation...
236236
237237
❌ Tier 1: FAILED - Line count exceeds 500 (got 1533)
238238
239-
**Iteration 1**: Moving detailed content to docs/ folder...
239+
**Iteration 1**: Moving detailed content to references/ folder...
240240
241-
Creating docs/:
242-
docs/workflow-details.md (extended step explanations)
243-
docs/common-issues.md (full KB articles with solutions)
244-
docs/examples.md (comprehensive success/rollback scenarios)
241+
Creating references/:
242+
references/workflow-details.md (extended step explanations)
243+
references/common-issues.md (full KB articles with solutions)
244+
references/examples.md (comprehensive success/rollback scenarios)
245245
246-
Updating SKILL.md with references to docs/...
246+
Updating SKILL.md with references to references/...
247247
248248
Running validation again...
249249
@@ -254,9 +254,9 @@ Running validation again...
254254
255255
**Files**:
256256
✅ ocp-admin/skills/cluster-upgrade/SKILL.md (323 lines)
257-
✅ ocp-admin/skills/cluster-upgrade/docs/workflow-details.md
258-
✅ ocp-admin/skills/cluster-upgrade/docs/common-issues.md
259-
✅ ocp-admin/skills/cluster-upgrade/docs/examples.md
257+
✅ ocp-admin/skills/cluster-upgrade/references/workflow-details.md
258+
✅ ocp-admin/skills/cluster-upgrade/references/common-issues.md
259+
✅ ocp-admin/skills/cluster-upgrade/references/examples.md
260260
261261
**Quality**: Production-ready, comprehensive, validation compliant
262262

.claude/skills/compass-manifest-maintenance/SKILL.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,19 @@ test -f CLAUDE.md && echo "✓ repo root" || echo "✗ wrong directory"
9696

9797
7. **Reconcile plugin MCP deps** — plugin `dependsOn` = union of all `mcpserver:` refs across pack skill manifests.
9898

99+
8. **Verify skill documentation layout** ([agent-plugins.org](https://agent-plugins.org/specification) / agentskills.io):
100+
- Skill-local documentation belongs in `skills/<skill-name>/references/`, not `docs/`.
101+
- **Allowed locations only:** pack-level `<pack>/references/` or skill-level `skills/<name>/references/`. **No** `references/references/` nesting inside a skill.
102+
- **Scan** every `skills/<skill-name>/` for a `docs/` directory.
103+
- **If `docs/` exists:**
104+
1. Rename or merge into `references/` (merge file-by-file when both exist).
105+
2. If `docs/references/` existed, flatten into `skills/<name>/references/` (not `references/references/`).
106+
3. Update markdown links in `SKILL.md` and all files under the skill directory: `docs/...``references/...` (also `./docs/...` and relative `../docs/...` segments).
107+
4. **Delete** the `docs/` directory after migration — do not leave an empty or stale `docs/` folder.
108+
5. Update symlinks under `references/` that still target `docs/` paths to `references/`.
109+
- Shared reference pools (e.g. `common-issues.md`, `live-doc-lookup.md`) symlinked into multiple skills must use link targets that resolve when opened through the symlink (same-directory or `references/...` paths from the symlink location).
110+
- Run `uv run python scripts/validate_compass_manifests.py` to confirm (includes manifest roster, bidirectional refs, and references layout).
111+
99112
### 2. Register a new pack in Compass
100113

101114
1. Create `<pack>/<pack>-plugin.yaml` from [assets/plugin-catalog-info.yaml](assets/plugin-catalog-info.yaml) with **`spec.lifecycle: development`** (default for new packs; confirm with user before raising maturity).
@@ -106,7 +119,7 @@ test -f CLAUDE.md && echo "✓ repo root" || echo "✗ wrong directory"
106119

107120
### 3. Drift / compliance audit
108121

109-
Run `uv run python scripts/validate_compass_manifests.py` (or `make validate-compass-manifests`). It enforces the same structural rules as this table:
122+
Run `uv run python scripts/validate_compass_manifests.py` (or `make validate-compass-manifests`). It enforces manifest roster, bidirectional refs, and skill references layout:
110123

111124
| Check | Rule |
112125
|-------|------|
@@ -117,6 +130,7 @@ Run `uv run python scripts/validate_compass_manifests.py` (or `make validate-com
117130
| Dangling refs | Every ref resolves to on-disk manifest or documented canonical MCP |
118131
| Forbidden | No `partOf`/`hasPart` on AiResource/MCPServer; no redundant `dependsOn: system:default/agentic-plugins` on plugins |
119132
| Namespace | Refs use `ai5-marketplace` except `mcpserver:redhat/*` and `default/agentic-plugins` |
133+
| Skill docs layout | No `skills/<name>/docs/` (delete after migrate); no `references/references/` nesting; links use `references/...` or `./references/...`, not `docs/...` |
120134

121135
Report violations with file path and fix per workflow §1. Do not weaken checks.
122136

@@ -131,6 +145,7 @@ Report violations with file path and fix per workflow §1. Do not weaken checks.
131145
- If skill on disk has no manifest → create from `assets/skill-catalog-info.yaml` and add Location target.
132146
- If inverse `dependencyOf` missing on plugin or MCP → update per [relationship-rules.md](references/relationship-rules.md).
133147
- If MCP ref cannot be resolved → grep pack manifests; do not invent new `mcpserver:` refs.
148+
- If `skills/<name>/docs/` exists or markdown links use `docs/...` → rename/merge to `references/`, flatten any `references/references/`, update link paths, **delete** `docs/`, fix symlinks; re-run `validate_compass_manifests.py`.
134149

135150
## Self-review checklist
136151

@@ -141,6 +156,7 @@ Report violations with file path and fix per workflow §1. Do not weaken checks.
141156
- [ ] Pack Location lists every skill manifest path.
142157
- [ ] Plugin `dependencyOf` lists every skill in the pack.
143158
- [ ] No `partOf`/`hasPart` on custom kinds.
159+
- [ ] Skill documentation uses `references/` only — no leftover `docs/` directory, no `references/references/` nesting; links use `references/...` or `./references/...`.
144160

145161
## Dependencies
146162

@@ -159,7 +175,6 @@ None — uses Read, Glob, Grep, Bash.
159175

160176
### Reference Documentation
161177

162-
- [CLAUDE.md](../../CLAUDE.md) — entity kinds, namespaces, reference formats
163178
- `scripts/validate_compass_manifests.py` — CI roster and bidirectional ref checks
164179
- [references/relationship-rules.md](references/relationship-rules.md)
165180
- [references/mcp-mapping.md](references/mcp-mapping.md)
@@ -171,11 +186,12 @@ None — uses Read, Glob, Grep, Bash.
171186
- **Orchestration gaps**`remediation`-style skills missing skill→skill edges or inverse `dependencyOf` on depended skills.
172187
- **Canonical vs owned** — Lightspeed and Security use `mcpserver:redhat/...`; do not register duplicates in `mcps/`.
173188
- **Unregistered packs**`rh-developer`, `rh-ai-engineer`, `rh-automation` exist on disk but are not in root Location until explicitly added.
189+
- **`docs/` vs `references/`** — agent-plugins.org expects `references/` for skill-local docs; rename/merge, flatten `references/references/`, update links, **delete** `docs/`, then run `make validate-compass-manifests`.
174190

175191
## Example usage
176192

177193
```bash
178-
# CI structural validation (roster + bidirectional refs)
194+
# CI structural validation (roster + bidirectional refs + references layout)
179195
uv run python scripts/validate_compass_manifests.py
180196
# or: make validate-compass-manifests
181197

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Both tiers must pass before submitting a PR.
6262

6363
- [ ] Tier 1 validation passed (agentskills.io spec)
6464
- [ ] Tier 2 validation passed (design principles)
65+
- [ ] Compass manifests and references layout validated: `make validate-compass-manifests`
6566
- [ ] Skill doc links validated: `uv run python scripts/validate_skill_doc_links.py <pack>/skills/<skill-name>/SKILL.md`
6667
- [ ] Skill doc tree links validated: `uv run python scripts/validate_docs_tree_links.py <pack>/skills/<skill-name>/SKILL.md`
6768
- [ ] Pack AGENTS.md intent routing updated

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ help:
99
@echo " validate-structure - Structure, links, compliance, MCP tools (no per-skill tier checks)"
1010
@echo " validate-collection-schema - Schema + roster + banners (subset of compliance)"
1111
@echo " validate-collection-compliance - Full .catalog compliance (includes collection.json drift)"
12-
@echo " validate-compass-manifests - Compass catalog-info.yaml roster and bidirectional refs"
12+
@echo " validate-compass-manifests - Compass manifests, roster, refs, and skill references/ layout"
1313
@echo " validate-skill-design - Validate all skills (use PACK=rh-sre for a specific pack)"
1414
@echo " validate-skill-design-changed - Validate only changed skills (staged + unstaged, for local dev)"
1515
@echo " validate-mcp-tools - Validate allowed-tools against live MCP servers (requires podman)"
@@ -56,6 +56,8 @@ validate: check-uv
5656
uv run python scripts/validate_skill_doc_links.py || EXIT=1; \
5757
echo "=== Validating docs tree links..."; \
5858
uv run python scripts/validate_docs_tree_links.py || EXIT=1; \
59+
echo "=== Running compass layout regression tests..."; \
60+
uv run python scripts/test_validate_compass_layout.py || EXIT=1; \
5961
echo "=== Validating collection compliance (.catalog/)..."; \
6062
uv run python scripts/validate_collection_compliance.py || EXIT=1; \
6163
echo "=== Validating Compass manifests..."; \
@@ -80,6 +82,8 @@ validate-structure: check-uv
8082
uv run python scripts/validate_skill_doc_links.py || EXIT=1; \
8183
echo "=== Validating docs tree links..."; \
8284
uv run python scripts/validate_docs_tree_links.py || EXIT=1; \
85+
echo "=== Running compass layout regression tests..."; \
86+
uv run python scripts/test_validate_compass_layout.py || EXIT=1; \
8387
echo "=== Validating collection compliance (.catalog/)..."; \
8488
uv run python scripts/validate_collection_compliance.py || EXIT=1; \
8589
echo "=== Validating Compass manifests..."; \

SKILL_DESIGN_PRINCIPLES.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,13 @@ Every skill MUST include a **Dependencies** section listing:
182182
```
183183

184184
**Skill-local docs rule (required):**
185-
- Internal docs consumed by a skill must resolve under that skill directory using `docs/...` links.
186-
- Do **not** use upward traversal links to pack-level docs such as `../docs/...`, `../../docs/...`, or `../../../docs/...`.
187-
- Shared docs may be reused via symlinks under `skills/<skill>/docs/...`.
188-
- Pack-level `docs/INDEX.md` and `docs/SOURCES.md` may exist for repository navigation/source attribution, but skills must not depend on them at execution time.
185+
- Internal docs consumed by a skill must resolve under that skill directory using `references/...` or `./references/...` links in `SKILL.md`.
186+
- Do **not** use upward traversal links to pack-level docs such as `../references/...`, `../../references/...`, or `../../../references/...`.
187+
- Shared docs may be reused via symlinks under `skills/<skill>/references/...`. Link targets inside shared pool files must resolve when the file is opened through a skill symlink (use same-directory or `references/...` paths from the symlink location).
188+
- After migrating `docs/``references/`, **delete** the `skills/<name>/docs/` directory — do not leave empty or stale folders.
189+
- Do **not** nest `references/references/` inside a skill. If `docs/references/` existed, flatten files into `skills/<name>/references/`.
190+
- Pack-level `<pack>/references/` or skill-level `skills/<name>/references/` are the only allowed reference locations.
191+
- Pack-level `references/INDEX.md` and `references/SOURCES.md` may exist for repository navigation/source attribution, but skills must not depend on them at execution time.
189192

190193
**Rationale**: Makes dependencies explicit for debugging and troubleshooting.
191194

ocp-admin/AGENTS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ Security validation skills use Python helper scripts in `scripts/security-valida
6767
- Triggering cluster installation
6868
- Applying static network configuration
6969
3. **Verify prerequisites** — before executing skills, check that required environment variables are set (OFFLINE_TOKEN for cluster creation/inventory, KUBECONFIG for cluster reports).
70-
4. **Reference documentation** — when users encounter errors, point them to specific docs:
71-
- Cluster creation issues → `docs/troubleshooting.md`
72-
- Network configuration → `docs/networking.md`, `docs/static-networking-guide.md`
73-
- Hardware requirements → `docs/host-requirements.md`
74-
- Multi-cluster authentication → `docs/multi-cluster-auth.md`
70+
4. **Reference documentation** — when users encounter errors, point them to skill-local references under `skills/cluster-creator/references/`:
71+
- Cluster creation issues → `skills/cluster-creator/references/troubleshooting.md`
72+
- Network configuration → `skills/cluster-creator/references/networking.md`, `skills/cluster-creator/references/static-networking-guide.md`
73+
- Hardware requirements → `skills/cluster-creator/references/host-requirements.md`
74+
- Multi-cluster authentication → `skills/cluster-creator/references/multi-cluster-auth.md`
7575
5. **Installation monitoring** — for `/cluster-creator`, actively monitor installation progress and report validation errors from cluster events. Don't just trigger installation and disappear.
7676
6. **OpenShift cluster verification**`/cluster-report` verifies each kubeconfig context is a genuine OpenShift cluster before reporting. Non-OpenShift contexts are skipped by default to avoid errors.
7777
7. **Suggest next steps** — after completing a skill, suggest related skills or documentation the user might need next.

0 commit comments

Comments
 (0)