Skip to content

refactor: standardize skill documentation on references/ layout - #156

Merged
rhartuv merged 6 commits into
RHEcosystemAppEng:mainfrom
rhartuv:feat/references
Sep 9, 2026
Merged

refactor: standardize skill documentation on references/ layout#156
rhartuv merged 6 commits into
RHEcosystemAppEng:mainfrom
rhartuv:feat/references

Conversation

@rhartuv

@rhartuv rhartuv commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Refactor: Standardize skill documentation on references/ layout and consolidate Compass validation

Summary

This PR migrates agentic pack skills from the legacy docs/ convention to the agent-plugins.org references/ layout, removes leftover duplicate directories, flattens accidental references/references/ nesting, and consolidates validation so regressions are caught in CI.
Jira ticket

Motivation

Skill-local documentation must live under references/, not docs/. The old docs/references/ structure caused double-nested references/references/ folders after migration. Pack-level docs/ duplicates also lingered after references/ was introduced.

Changes

Documentation migration (all packs)

  • Renamed skills/<name>/docs/skills/<name>/references/ across 46+ skills
  • Deleted leftover docs/ directories after migration
  • Migrated pack-level navigation docs to references/ (not deleted):
    • rh-automation: restored references/INDEX.md, SOURCES.md, and .ai-index/ with paths to canonical skill files
    • rh-sre: moved pack index to references/; updated INDEX.md and .ai-index/ JSON to point at skills/*/references/ canonical files
  • Removed duplicate pack-level docs/ trees (ocp-admin, rh-sre, rh-virt, rh-automation) where skill-local references/ already held the content
  • Updated markdown links from docs/... to references/... (including ./references/ in SKILL.md)
  • Fixed pack README and .catalog fragments still pointing at docs/INDEX.md (rh-sre, rh-automation, rh-developer, ocp-admin, rh-virt)
  • Flattened 28 references/references/ directories into skills/<name>/references/
  • Repaired ~260 symlinks and cross-reference paths broken by the flattening
  • Fixed skill-root companion markdown links (e.g. rh-virt/skills/vm-rebalance/REBALANCE_MANUAL.md)
  • Replaced plain-text docs/ path examples in skills (execution-summary, incident-triage, debug-rbac, debug-scc) with skills/.../references/... or references/... forms

Validation (single entry point + regression tests)

  • Extended scripts/validate_compass_manifests.py to enforce:
    • No skills/<name>/docs/
    • No references/references/ nesting
    • No skill-local docs/ markdown links
    • No references/ symlinks targeting docs/ paths
  • Removed scripts/validate_skill_references_layout.py (merged into compass validation)
  • Updated validate_skill_doc_links.py:
    • Accepts references/... and ./references/...
    • Scans skill-root markdown (REBALANCE_*.md, etc.) in addition to SKILL.md
    • Detects symlink chains before .resolve() (avoids false negatives on shared-pool symlinks)
  • Updated validate_docs_tree_links.py to scan:
    • skills/*/references/**/*.md
    • Skill-root *.md under each skill directory
    • Pack-level references/**/*.md and leftover docs/**/*.md
    • README / .catalog links under references/, skills/, and stale docs/ (migration regressions fail CI)
  • Updated validate_skills_tier1.py: docs/ is no longer an allowed skill subdirectory (error, not warning)
  • Updated validate_skills_tier2.py: large-skill guidance suggests references/ only
  • Added scripts/test_validate_compass_layout.py regression tests (leftover docs/, nested references/references/, forbidden docs/ links, README docs/ links, symlink-chain detection, Tier 1 docs/ rejection)
  • Wired layout regression tests into make validate and make validate-structure

Authoring standards

  • SKILL_DESIGN_PRINCIPLES.md — requires references/, forbids nested references/references/, documents symlink pool link rules
  • compass-manifest-maintenance skill — workflow to scan, migrate, flatten, delete docs/, fix symlinks, validate via make validate-compass-manifests
  • agentic-contribution-skill — creates references/, not docs/
  • rh-virt/SKILL_TEMPLATE.md — troubleshooting examples use references/troubleshooting/... (new virt skills pass Compass layout checks)
  • Pack READMEs, .catalog/documentation_section.md fragments, and collection.yaml embedded_doc paths updated

Note for Reviewers:
Due to file relocation, this PR touches ~700 files. Most changes are path updates and moved files.

Test plan

  • make validate passes locally
  • uv run python scripts/validate_skill_doc_links.py — passes (70 skills, 388 reference links)
  • uv run python scripts/validate_docs_tree_links.py — passes (444 files)
  • No skills/*/docs/ directories remain
  • No skills/*/references/references/ directories remain
  • New/changed skills have valid YAML frontmatter (name, description)
  • New/changed agents have valid YAML frontmatter (name, description)

@rhartuv rhartuv self-assigned this Sep 8, 2026
@rhartuv rhartuv added enhancement New feature or request skills labels Sep 8, 2026
@rhartuv
rhartuv requested a review from RedTanny September 8, 2026 08:46
@rhartuv rhartuv changed the title chore: standardize skill documentation on references/ layout refactor: standardize skill documentation on references/ layout Sep 8, 2026
@rhartuv
rhartuv marked this pull request as ready for review September 8, 2026 09:22
@rhartuv
rhartuv marked this pull request as draft September 8, 2026 09:27
@rhartuv rhartuv added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Sep 8, 2026
@rhartuv
rhartuv marked this pull request as ready for review September 8, 2026 09:42

@RedTanny RedTanny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all high issues resolve good work
new review found some medium and low issues please check

Request changes

Follow-up c871bf6 closed the previous High findings (automation INDEX/SOURCES, sre INDEX/README/catalog, docs-tree coverage, REBALANCE_MANUAL.md). Local Compass + both link validators pass on this head.

Three Medium items from the last merge bar are still open and belong in this PR.

Severity Location Finding
Medium rh-virt/SKILL_TEMPLATE.md:198-400 Still uses ../../docs/troubleshooting/…. New virt skills from this template will fail the new Compass check.
Medium scripts/validate_skill_doc_links.py:123 (skill_dir / path).resolve() before is_symlink() kills chain detection. Regression vs main. skill_dir / normalized already handles ./references/.
Medium scripts/validate_skills_tier1.py:40, validate_skills_tier2.py:690 Tier 1 still allows docs/; Tier 2 still suggests references/ or docs/. New skills can pass T1 and fail Compass.
Medium Compass layout checks No tests for leftover skills/*/docs/, nested references/references/, README docs/ links, or the .resolve() regression.
Low ocp-admin/README.md, rh-virt/README.md Architecture trees still draw pack-level docs/ (those dirs are gone).
Low rh-developer/.catalog/documentation_section.md:14 Still says “See docs/”. Files now live under skills/*/references/.
Low rh-sre/skills/execution-summary/SKILL.md; rh-developer incident-triage, debug-rbac, debug-scc Plain-text docs/ leftovers (not markdown links, so CI misses them).

Please land the three Mediums in this PR: template → references/troubleshooting/…, restore symlink-chain detection on the unresolved path, drop docs/ from Tier 1 / Tier 2.

@rhartuv
rhartuv requested a review from RedTanny September 9, 2026 09:09
RedTanny
RedTanny previously approved these changes Sep 9, 2026

@RedTanny RedTanny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve

8f6d951 closed the remaining Mediums from the last review. Local Compass + both link validators + scripts/test_validate_compass_layout.py (6 tests) pass on this head. GitHub CI is green (Tier 1, Tier 2, codespell, MCP tool check).

Previous finding Status
Medium rh-virt/SKILL_TEMPLATE.md ../../docs/troubleshooting/… Fixed — examples use references/troubleshooting/…
Medium validate_skill_doc_links.py .resolve() before is_symlink() Fixed — chain check runs on the unresolved path; regression test covers it
Medium Tier 1 allows docs/; Tier 2 suggests docs/ Fixed — Tier 1 errors on docs/; Tier 2 hint is references/ only
Medium no Compass layout tests Fixed — leftover docs/, nested references/references/, forbidden docs/ links, README docs/ links, symlink-chain, Tier 1 rejection; wired into make validate / validate-structure
Low ocp-admin / rh-virt README trees Fixed
Low rh-developer catalog “See docs/ Fixed
Low execution-summary + debug-rbac/scc/incident-triage plain-text docs/ Fixed

Previous Highs from 5ed196f remain closed (automation INDEX/SOURCES, sre INDEX/README/catalog, docs-tree coverage, REBALANCE_MANUAL.md). No skills/*/docs/ or nested references/references/ remain.

Non-blocking leftovers if you want a cleanup commit later: ocp-admin/AGENTS.md still cites pack-level docs/*.md; shared debugging-patterns.md still says docs/python-s2i-entrypoints.md; virt troubleshooting INDEX still says docs/troubleshooting/ when suggesting a new category file; pack-level rh-virt/references/troubleshooting/.ai-index/ is leftover after the files moved under skills/*/references/.

@rhartuv

rhartuv commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@r2dedios PTAL
@RedTanny Already approved
Thanks 🙏

@rhartuv
rhartuv requested a review from RedTanny September 9, 2026 12:05
RedTanny
RedTanny previously approved these changes Sep 9, 2026

@RedTanny RedTanny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@r2dedios r2dedios left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that the files common-issues.md and live-doc-lookup.md are repeated multiple times in rh-ai-engineer plugin. Why is that so? The rest of doc files are symlinks so I suppose this could be a mistake.

@r2dedios r2dedios left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a tiny mistake on a link. The rest looks good!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [CLAUDE.md](../../../CLAUDE.md) — entity kinds, namespaces, reference formats

This relative link is broken. It refers to .claude/CLAUDE.md instead of ./CLAUDE.md

@rhartuv
rhartuv requested review from RedTanny and r2dedios September 9, 2026 14:55

@r2dedios r2dedios left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@rhartuv
rhartuv merged commit 6c97435 into RHEcosystemAppEng:main Sep 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants