You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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)
122
122
123
123
**Quality over Speed**: Focus on gathering complete, accurate information. Validation and iteration will ensure correctness - prioritize quality of final result over generation time.
124
124
@@ -210,7 +210,7 @@ Show complete spec:
210
210
**Workflow**: <N> steps
211
211
**Common Issues**: <N> documented
212
212
**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/)
214
214
**Human-in-the-Loop**: <Yes/No>
215
215
216
216
[If >10 steps or complex workflow]:
@@ -229,26 +229,26 @@ Proceed with generation? (yes/no)
4.**Create <pack>/mcps.json**: If new MCP server needed (use `${ENV_VAR}` format)
247
247
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
248
248
6.**Update marketplace/rh-agentic-collection.yml** in [agentic-catalog](https://github.com/RHEcosystemAppEng/agentic-catalog): If new pack (register pack for Lola installation)
249
249
7.**Create pack structure**: If new pack (README.md, AGENTS.md, skills/ directory)
250
250
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.
252
252
253
253
### Phase 5: Validation & Iteration
254
254
@@ -267,18 +267,18 @@ uv run python scripts/validate_skills_tier2.py <pack>/skills/<skill-name>/SKILL.
267
267
**Report clearly**:
268
268
- ✅ PASSED → Proceed to Phase 6
269
269
- ⚠️ WARNINGS → Review warnings with user
270
-
- Non-standard subdirectory (docs/) is acceptable if needed
270
+
- Non-standard subdirectory (references/) is acceptable if needed
271
271
- Description buzzwords acceptable if accurate for critical skills
272
272
- Ask: "Warnings acceptable? (yes/no)"
273
273
- ❌ ERRORS → **Fix required**, iterate until validation passes
274
274
275
275
**Iteration Protocol** (if validation fails):
276
276
1.**Analyze errors**: Identify specific issues (line count, missing sections, format problems)
277
277
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
279
279
- Missing sections → Add required sections per DP7
280
280
- Format issues → Correct frontmatter, section headers, or structure
- 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
+
99
112
### 2. Register a new pack in Compass
100
113
101
114
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).
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:
110
123
111
124
| Check | Rule |
112
125
|-------|------|
@@ -117,6 +130,7 @@ Run `uv run python scripts/validate_compass_manifests.py` (or `make validate-com
117
130
| Dangling refs | Every ref resolves to on-disk manifest or documented canonical MCP |
118
131
| Forbidden | No `partOf`/`hasPart` on AiResource/MCPServer; no redundant `dependsOn: system:default/agentic-plugins` on plugins |
119
132
| 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/...`|
120
134
121
135
Report violations with file path and fix per workflow §1. Do not weaken checks.
122
136
@@ -131,6 +145,7 @@ Report violations with file path and fix per workflow §1. Do not weaken checks.
131
145
- If skill on disk has no manifest → create from `assets/skill-catalog-info.yaml` and add Location target.
132
146
- If inverse `dependencyOf` missing on plugin or MCP → update per [relationship-rules.md](references/relationship-rules.md).
133
147
- 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`.
134
149
135
150
## Self-review checklist
136
151
@@ -141,6 +156,7 @@ Report violations with file path and fix per workflow §1. Do not weaken checks.
141
156
-[ ] Pack Location lists every skill manifest path.
142
157
-[ ] Plugin `dependencyOf` lists every skill in the pack.
143
158
-[ ] 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/...`.
-**Orchestration gaps** — `remediation`-style skills missing skill→skill edges or inverse `dependencyOf` on depended skills.
172
187
-**Canonical vs owned** — Lightspeed and Security use `mcpserver:redhat/...`; do not register duplicates in `mcps/`.
173
188
-**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`.
174
190
175
191
## Example usage
176
192
177
193
```bash
178
-
# CI structural validation (roster + bidirectional refs)
Copy file name to clipboardExpand all lines: SKILL_DESIGN_PRINCIPLES.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -182,10 +182,13 @@ Every skill MUST include a **Dependencies** section listing:
182
182
```
183
183
184
184
**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.
189
192
190
193
**Rationale**: Makes dependencies explicit for debugging and troubleshooting.
Copy file name to clipboardExpand all lines: ocp-admin/AGENTS.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,11 +67,11 @@ Security validation skills use Python helper scripts in `scripts/security-valida
67
67
- Triggering cluster installation
68
68
- Applying static network configuration
69
69
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:
5.**Installation monitoring** — for `/cluster-creator`, actively monitor installation progress and report validation errors from cluster events. Don't just trigger installation and disappear.
76
76
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.
77
77
7.**Suggest next steps** — after completing a skill, suggest related skills or documentation the user might need next.
0 commit comments